/* =========================================================
   SunSystems - style.css
   Otimizado: performance, acessibilidade e SEO
   ========================================================= */
:root {
    --primary: #0a0f1c;
    --secondary: #d1fa1c;
    --accent: #22d3ee;
    --accent-dark: #0ea5e9;
    --bg: #000000;
    --bg-light: #0f172a;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --ok: #22c55e;
    --warn: #f59e0b;
    --error: #ef4444;
    --ff-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --fs-100: 0.875rem;
    --fs-200: 1rem;
    --fs-300: 1.125rem;
    --fs-400: 1.25rem;
    --fs-500: 1.5rem;
    --fs-600: 2rem;
    --fs-700: 2.5rem;
    --fs-800: 3rem;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 40px;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, .25);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, .3);
    --shadow-lg: 0 15px 35px rgba(34, 211, 238, .15);
}

/* Rolagem suave nativa (site todo) */
html {
    scroll-behavior: smooth;
}

/* Compensa a navbar fixa ao ancorar (site todo) */
section, header, footer {
    scroll-margin-top: 110px; /* ajuste conforme altura real da navbar */
}

/* Opcional: offset maior em mobile, se a navbar crescer */
@media (max-width: 768px) {
    section, header, footer {
        scroll-margin-top: 140px;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--ff-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    color: var(--text);
    text-decoration: none;
}

a:hover,
a:focus-visible {
    color: var(--accent);
}

:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

.skip-to-content {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--accent);
    color: #000;
    padding: 8px 12px;
    z-index: 9999;
}

.skip-to-content:focus-visible {
    top: 10px;
}

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

.container {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 20px;
}

header,
section,
footer {
    padding: 80px 20px;
    max-width: 1200px;
    margin: auto;
    position: relative;
    z-index: 1;
    content-visibility: auto;
    contain-intrinsic-size: 1px 1000px;
}
/* 1) O overlay do header não deve capturar cliques */
header::before {
  pointer-events: none;
}

/* 2) Garantir que a área clicável dos botões esteja acima de qualquer camada */
header h1, header p, header a, .btn, .btn-accent {
  position: relative;
  z-index: 2; /* acima do ::before e quaisquer efeitos */
}

/* 3) Grupo de CTAs para alinhamento consistente (inclua em páginas internas e no hero) */
.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn, .btn-accent {
  vertical-align: middle;
}

/* 4) Opcional: centralizar CTAs no hero mobile (já funciona com seu layout, mas reforça) */
@media (max-width: 768px) {
  .cta-group {
    justify-content: center;
  }
}
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 15, 28, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(34, 211, 238, 0.1);
}

@supports not ((-webkit-backdrop-filter: blur(10px)) or (backdrop-filter: blur(10px))) {
    .navbar {
        background: #0a0f1c;
    }
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--secondary), var(--accent));
    border-radius: var(--radius-md);
    margin-right: 15px;
    font-weight: bold;
    font-size: 20px;
    color: var(--primary);
    box-shadow: 0 0 15px rgba(209, 250, 28, .5);
    transition: transform .2s ease, box-shadow .2s ease;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(to right, var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color .3s ease;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--secondary), var(--accent));
    transition: width .3s ease;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
    width: 100%;
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.tech-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: .05;
    background-image:
        linear-gradient(rgba(34, 211, 238, .2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, .2) 1px, transparent 1px);
    background-size: 50px 50px;
    contain: layout paint size style;
}

.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    contain: layout paint size style;
}

.shape {
    position: absolute;
    background: linear-gradient(45deg, var(--secondary), var(--accent));
    opacity: .05;
    border-radius: 50%;
    animation: float 15s infinite ease-in-out;
}

.shape:nth-child(1) {
    width: 300px;
    height: 300px;
    top: -150px;
    left: -150px;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 200px;
    height: 200px;
    bottom: -100px;
    right: 20%;
    animation-delay: -5s;
}

.shape:nth-child(3) {
    width: 150px;
    height: 150px;
    top: 20%;
    right: -75px;
    animation-delay: -10s;
}

/* Fundo global do hero com gradientes + imagem customizada (sitewide) */
header {
    background:
        radial-gradient(circle at 10% 20%, rgba(34, 211, 238, 0.15) 0%, transparent 20%),
        radial-gradient(circle at 90% 60%, rgba(209, 250, 28, 0.1) 0%, transparent 20%),
        image-set(
            url("/assets/hero.avif") type("image/avif"),
            url("/assets/hero.webp") type("image/webp"),
            url("/assets/hero.jpg") type("image/jpeg")
        ) no-repeat center center / cover;
    color: #fff;
    text-align: left;
    position: relative;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    margin-top: 90px;
}

header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10, 15, 28, 0.9) 0%, rgba(0, 0, 0, 0.85) 100%);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

header h1,
header p,
header a {
    position: relative;
    z-index: 1;
}

header h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    background: linear-gradient(to right, var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 1s ease;
}

header p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    max-width: 600px;
    animation: fadeInUp 1.2s ease;
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    margin: 10px 10px 0 0;
    background: var(--secondary);
    color: #000;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1.4s ease;
    min-height: 44px;
    min-width: 44px;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, color .2s ease, background-color .2s ease;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .2), transparent);
    transition: .5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    background: var(--accent);
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(34, 211, 238, .3);
}

.btn:focus-visible {
    box-shadow: 0 0 0 3px #000, 0 0 0 6px var(--accent);
}

.btn-accent {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}

.btn-accent:hover {
    background: var(--accent);
    color: #000;
}

.btn-accent:focus-visible {
    box-shadow: 0 0 0 3px #000, 0 0 0 6px var(--accent);
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 50px;
    text-align: center;
    background: linear-gradient(to right, var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    padding-bottom: 15px;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, var(--secondary), var(--accent));
    border-radius: 3px;
}

.features,
.why,
.cases,
.contact {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.card {
    background: linear-gradient(145deg, #0f172a, #0a1223);
    border: 1px solid rgba(34, 211, 238, .1);
    border-radius: 16px;
    padding: 30px;
    flex: 1 1 300px;
    color: #e2e8f0;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    will-change: transform;
    transform: translateZ(0);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, color .2s ease, background-color .2s ease;
}

.card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    z-index: -1;
    background: linear-gradient(45deg, var(--secondary), var(--accent), var(--secondary));
    border-radius: 18px;
    opacity: 0;
    transition: opacity .4s ease;
}

.card:hover::before {
    opacity: .1;
}

.card:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow: var(--shadow-lg);
    border-color: rgba(34, 211, 238, .28);
}

.card h3 {
    color: var(--secondary);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--accent);
}

.card-cta {
    display: inline-block;
    margin-top: 12px;
    color: var(--accent);
    font-weight: 600;
}

.card-cta:hover,
.card-cta:focus-visible {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.badge {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 8px;
    border: 1px solid rgba(34, 211, 238, .4);
    color: var(--accent);
    border-radius: 6px;
    font-size: .85rem;
    background: rgba(34, 211, 238, .06);
}

footer {
    background: linear-gradient(to top, var(--primary), #050913);
    color: #fff;
    text-align: center;
    padding: 60px 20px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    position: relative;
    overflow: hidden;
    margin-top: 50px;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--secondary), var(--accent));
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    margin-bottom: 20px;
    text-decoration: none;
}

.footer-logo-img {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--secondary), var(--accent));
    border-radius: 10px;
    margin-right: 10px;
    font-weight: bold;
    font-size: 18px;
    color: var(--primary);
}

.footer-logo-text {
    font-size: 1.3rem;
    font-weight: bold;
    background: linear-gradient(to right, var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

footer a {
    color: var(--text);
    text-decoration: none;
}

footer a:hover,
footer a:focus-visible {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 211, 238, .4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(34, 211, 238, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 211, 238, 0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all .8s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(20px, 40px) rotate(5deg);
    }
    50% {
        transform: translate(-30px, 20px) rotate(-5deg);
    }
    75% {
        transform: translate(10px, -30px) rotate(3deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    .animate-on-scroll,
    .shape {
        animation: none !important;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px;
        flex-direction: column;
        gap: 15px;
    }
    .nav-links {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    header {
        margin-top: 140px;
        min-height: 80vh;
        text-align: center;
        background-position: center center;
    }
    header h1 {
        font-size: 2.5rem;
    }
    header p {
        font-size: 1.1rem;
        margin: 0 auto 30px;
    }
    section h2 {
        font-size: 2rem;
    }
    .btn {
        display: block;
        margin: 10px auto;
        text-align: center;
        max-width: 250px;
    }
    .features,
    .why,
    .cases {
        gap: 20px;
    }
    .card {
        padding: 24px;
    }
}
/* =========================================================
   ESTILOS DO FORMULÁRIO DE CONTATO
   ========================================================= */

/* Mensagens do formulário */
.form-message {
    padding: 16px 20px;
    margin: 0 0 30px 0;
    border-radius: var(--radius-md);
    border: 1px solid;
    font-family: var(--ff-sans);
    box-shadow: var(--shadow-md);
    animation: fadeInUp 0.5s ease;
    position: relative;
    z-index: 10;
}

.form-message-success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.form-message-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.message-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.message-icon {
    font-weight: bold;
    font-size: 1.2em;
    flex-shrink: 0;
}

.message-text {
    flex: 1;
    font-weight: 500;
    line-height: 1.5;
}

.message-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    opacity: 0.7;
    border-radius: 4px;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.message-close:hover,
.message-close:focus-visible {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

/* Grupos de formulário */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
    font-size: var(--fs-200);
}

.form-group label:after {
    content: ' *';
    color: var(--error);
    opacity: 0.7;
}

.form-group label:has(+ input:not([required])):after,
.form-group label:has(+ select:not([required])):after,
.form-group label:has(+ textarea:not([required])):after {
    content: '';
}

/* Campos do formulário */
#form input,
#form select,
#form textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(34, 211, 238, 0.2);
    background: var(--bg-light);
    color: var(--text);
    font-family: var(--ff-sans);
    font-size: var(--fs-200);
    transition: all 0.3s ease;
    resize: vertical;
}

#form input::placeholder,
#form textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

#form input:focus,
#form select:focus,
#form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
    background: rgba(15, 23, 42, 0.8);
}

#form input:hover,
#form select:hover,
#form textarea:hover {
    border-color: rgba(34, 211, 238, 0.3);
}

/* Select personalizado */
#form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2322d3ee'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 48px;
}

/* Textarea */
#form textarea {
    min-height: 120px;
    line-height: 1.5;
}

/* Ações do formulário */
.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid rgba(34, 211, 238, 0.1);
}

.form-actions .btn {
    flex: 1;
    min-width: 160px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Loading state */
button[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

button[disabled]:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Spinner animation */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsividade do formulário */
@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        min-width: auto;
        width: 100%;
    }
    
    #form {
        padding: 20px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
}

/* Header da página de contato */
#main-content header {
    background:
        radial-gradient(circle at 10% 20%, rgba(34, 211, 238, 0.15) 0%, transparent 20%),
        radial-gradient(circle at 90% 60%, rgba(209, 250, 28, 0.1) 0%, transparent 20%),
        linear-gradient(135deg, rgba(10, 15, 28, 0.9) 0%, rgba(0, 0, 0, 0.85) 100%);
    text-align: center;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

#main-content header h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

#main-content header p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}
/* Mensagens do formulário */
.form-message {
    padding: 16px 20px;
    margin: 0 0 30px 0;
    border-radius: 12px;
    border: 1px solid;
    font-family: ui-sans-serif, system-ui, sans-serif;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.5s ease;
}

.form-message-success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.form-message-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.message-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.message-icon {
    font-weight: bold;
    font-size: 1.2em;
    flex-shrink: 0;
}

.message-text {
    flex: 1;
    font-weight: 500;
}

.message-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    opacity: 0.7;
    border-radius: 4px;
}

.message-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}