/* 1. VARIÁVEIS E RESET */
:root { --primary: #5609f6; --primary-glow: #5609f6aa; --bg-dark: #050505; --bg-card: #0f0f0f; --text-main: #e0e0e0; --text-muted: #888888; --white: #ffffff; --border: rgba(255, 255, 255, 0.08); }
* { margin: 0; padding: 0; box-sizing: border-box; }
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
body { font-family: 'Poppins', sans-serif; background-color: var(--bg-dark); color: var(--text-main); line-height: 1.6; overflow-x: hidden; }

/* TYPO */
h1, h2, h3 { color: var(--white); font-weight: 800; letter-spacing: -1px; line-height: 1.1; }
h1 { font-size: clamp(3rem, 8vw, 5.5rem); text-transform: uppercase; }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 20px; }
.highlight { color: var(--primary); -webkit-text-stroke: 1px var(--primary); }
.section-title.center { text-align: center; }
.section-subtitle { text-align: center; color: var(--text-muted); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 40px; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
section { padding: 100px 0; position: relative; }
section[id] { scroll-margin-top: 80px; }

/* BUTTONS */
.cta-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--primary); color: white; padding: 18px 40px; font-weight: 600; text-decoration: none; border-radius: 100px; transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); border: 1px solid transparent; cursor: pointer; border: none; font-family: inherit; font-size: 1rem; }
.cta-button:hover { background: transparent; border: 1px solid var(--primary); box-shadow: 0 0 30px var(--primary-glow); transform: scale(1.05); }

/* HEADER */
header { position: fixed; top: 0; width: 100%; z-index: 100; background: rgba(5, 5, 5, 0.8); backdrop-filter: blur(15px); border-bottom: 1px solid var(--border); }
header nav { height: 90px; display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 50px; }
.nav-links { display: flex; list-style: none; gap: 30px; align-items: center; }
.nav-links a { color: var(--text-main); text-decoration: none; font-weight: 500; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; transition: color 0.3s; }
.nav-links a:hover { color: var(--primary); }
.burger { display: none; cursor: pointer; }
.burger div { width: 25px; height: 2px; background: white; margin: 5px; }

/* HERO */
#hero { height: 100vh; display: flex; align-items: center; position: relative; overflow: hidden; padding-top: 90px; background-color: var(--bg-card); /* Fallback bg */ }
.hero-video-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; opacity: 0.5; background: #000; /* Previne flash branco */ }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, var(--bg-dark), rgba(5,5,5,0.7)); z-index: 1; }
.hero-content { position: relative; z-index: 2; max-width: 900px; }
.hero-content p { font-size: 1.5rem; margin: 30px 0; max-width: 600px; color: var(--text-muted); }

/* ABOUT */
.sobre-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.destaques-numericos { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.destaque-item h3 { font-size: 4rem; color: var(--primary); margin: 0; line-height: 1; }
.destaque-item span { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 2px; color: var(--text-muted); }

/* GLOW CARDS */
.glow-card { position: relative; background: var(--bg-card); border-radius: 12px; padding: 2px; overflow: hidden; }
.glow-card::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(86, 9, 246, 0.4), transparent 40%); opacity: 0; transition: opacity 0.5s; z-index: 1; pointer-events: none; }
.glow-card:hover::before { opacity: 1; }
.glow-content { background: var(--bg-card); border-radius: 10px; padding: 40px 30px; position: relative; z-index: 2; height: 100%; }

/* SERVICES */
.servicos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.icon-box { font-size: 2.5rem; color: var(--primary); margin-bottom: 20px; }
.servico-item p { font-size: 0.95rem; color: var(--text-muted); }

/* METHOD */
.metodologia-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step-number { font-size: 4rem; font-weight: 800; color: rgba(255,255,255,0.03); position: absolute; top: -10px; right: 10px; }

/* PORTFOLIO (FIXED) */
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.portfolio-item { position: relative; height: 400px; border-radius: 12px; cursor: pointer; border: 1px solid var(--border); perspective: 1000px; overflow: hidden; background-color: #1a1a1a; /* Cor de fundo para quando vazio */ }
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.1s; will-change: transform; display: block; }
/* Esconde ícone de imagem quebrada */
.portfolio-item img[src=""], .portfolio-item img:not([src]) { opacity: 0; }

.portfolio-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, var(--bg-dark), transparent); opacity: 0.6; transition: 0.4s; pointer-events: none; display: flex; align-items: center; justify-content: center; }
.open-gallery-icon { font-size: 3rem; color: rgba(255,255,255,0.8); opacity: 0; transform: scale(0.5); transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.portfolio-item:hover .open-gallery-icon { opacity: 1; transform: scale(1); }
.portfolio-info { position: absolute; bottom: 0; left: 0; width: 100%; padding: 30px; transform: translateY(20px); opacity: 0; transition: 0.4s; z-index: 2; pointer-events: none; }
.portfolio-item:hover .portfolio-info { transform: translateY(0); opacity: 1; }
.portfolio-item:hover .portfolio-overlay { opacity: 0.9; }

/* CLIENTES */
.logo-carousel-wrapper { overflow: hidden; white-space: nowrap; margin-top: 40px; padding: 40px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.logo-carousel-track { display: inline-block; animation: scroll 40s linear infinite; }
.logo-carousel-track img { height: 40px; margin: 0 40px; opacity: 0.5; transition: 0.3s; }
.logo-carousel-track img:hover { opacity: 1; }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* TESTIMONIALS (FIXED) */
.depoimento-carousel-container { overflow: hidden; max-width: 800px; margin: 0 auto; position: relative; }
.depoimento-carousel-track { display: flex; transition: transform 0.6s cubic-bezier(0.2, 1, 0.3, 1); }
.depoimento-card { min-width: 100%; padding: 40px; text-align: center; }
.depoimento-card blockquote { font-size: 1.4rem; font-style: italic; margin-bottom: 30px; line-height: 1.4; }
.depoimento-author img { width: 70px; height: 70px; border-radius: 50%; margin-right: 20px; border: 2px solid var(--primary); object-fit: cover; background: #1a1a1a; }
.depoimento-author { display: flex; align-items: center; justify-content: center; }
.depoimento-author div { text-align: left; }
.depoimento-author cite { display: block; font-weight: 700; color: white; font-style: normal; font-size: 1.1rem; }
.depoimento-author span { color: var(--text-muted); font-size: 0.9rem; }
.depoimento-navigation { display: flex; justify-content: center; gap: 20px; margin-top: 20px; }
.depoimento-navigation button { background: var(--bg-card); color: white; border: 1px solid var(--border); width: 50px; height: 50px; border-radius: 50%; cursor: pointer; transition: 0.3s; display: flex; align-items: center; justify-content: center; }
.depoimento-navigation button:hover { background: var(--primary); border-color: var(--primary); }

/* CONTACT */
.contato-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.contact-links { display: flex; gap: 20px; margin-top: 30px; }
.whatsapp { background: #25D366; } .whatsapp:hover { border-color: #25D366; box-shadow: 0 0 30px rgba(37, 211, 102, 0.5); }
.email { background: var(--bg-card); border-color: var(--border); }
.contact-form input, .contact-form textarea { width: 100%; background: var(--bg-card); border: 1px solid var(--border); padding: 20px; color: white; margin-bottom: 20px; font-family: inherit; transition: 0.3s; border-radius: 8px; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--primary); outline: none; }
.full-width { width: 100%; }
footer { background: var(--bg-card); padding: 50px 0; text-align: center; margin-top: 100px; border-top: 1px solid var(--border); }
.footer-socials { margin-bottom: 20px; }
.footer-socials a { color: var(--text-main); font-size: 1.5rem; margin: 0 15px; transition: 0.3s; }
.footer-socials a:hover { color: var(--primary); }

/* MODAL */
.portfolio-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; }
.portfolio-modal.active { opacity: 1; pointer-events: auto; }
.modal-backdrop { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); backdrop-filter: blur(10px); }
.modal-content-wrapper { position: relative; z-index: 2; background: var(--bg-card); width: 90%; max-width: 1000px; max-height: 90vh; border-radius: 16px; border: 1px solid var(--border); overflow-y: auto; padding: 40px; transform: translateY(30px); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); scrollbar-width: thin; scrollbar-color: var(--primary) var(--bg-dark); }
.portfolio-modal.active .modal-content-wrapper { transform: translateY(0); }
.modal-content-wrapper::-webkit-scrollbar { width: 8px; }
.modal-content-wrapper::-webkit-scrollbar-track { background: var(--bg-dark); border-radius: 10px; }
.modal-content-wrapper::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }
.modal-close { position: absolute; top: 20px; right: 20px; background: rgba(255,255,255,0.1); border: none; color: white; width: 40px; height: 40px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; transition: 0.3s; display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: var(--danger); }
.modal-header { margin-bottom: 40px; text-align: center; }
.modal-header h3 { font-size: 2.2rem; margin-bottom: 5px; color: var(--primary); }
.modal-header p { color: var(--text-muted); text-transform: uppercase; letter-spacing: 2px; font-size: 0.9rem; }
.modal-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.modal-gallery img, .modal-gallery video { width: 100%; border-radius: 8px; border: 1px solid var(--border); object-fit: cover; }

/* RESPONSIVE */
@media(max-width: 1024px) { .portfolio-grid, .metodologia-grid { grid-template-columns: 1fr 1fr; } h1 { font-size: 3.5rem; } }
@media(max-width: 768px) { .nav-links { display: none; } .burger { display: block; } .sobre-grid, .contato-grid, .portfolio-grid, .metodologia-grid { grid-template-columns: 1fr; } .destaques-numericos { grid-template-columns: 1fr 1fr; } .contact-links { flex-direction: column; } .cta-button { width: 100%; } }