:root {
  color-scheme: dark;
  --bg-main: #121417;
  --bg-card: #1F242A;
  --bg-card-soft: #191D22;
  --border: #2A3038;
  --primary: #3B82F6;
  --primary-hover: #2563EB;
  --success: #22C55E;
  --text-main: #E5E7EB;
  --text-muted: #9CA3AF;
  --danger: #EF4444;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: "Comfortaa", sans-serif; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

section[id] { scroll-margin-top: 5rem; }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

/* ===== REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== BOTÕES ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}
.btn.primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59,130,246,0.35);
}

.btn.ghost {
  background: transparent;
  color: var(--text-main);
  border-color: var(--border);
}
.btn.ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn.whatsapp {
  background: var(--success);
  color: #fff;
}
.btn.whatsapp:hover {
  background: #16A34A;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(34,197,94,0.35);
}

/* ===== HEADER ===== */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 20, 23, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s, border-color 0.3s;
}
header.scrolled {
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  border-bottom-color: var(--border);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}
.brand-logo {
  height: 46px;
  width: auto;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  width: 34px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
}
.brand-mark .material-symbols-outlined { font-size: 20px; }
.brand span.accent { color: var(--primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-main); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 28px;
  cursor: pointer;
  padding: 4px;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 140px 0 100px;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(59,130,246,0.14), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(34,197,94,0.10), transparent 45%);
}

.hero .container { text-align: center; max-width: 780px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.35);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}
.hero h1 span { color: var(--primary); }

.hero p.lead {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ===== SECTION HEADINGS ===== */
.section { padding: 96px 0; }
.section.alt { background: var(--bg-card-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 56px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.eyebrow::before {
  content: "";
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background: var(--primary);
}
.section-head h2 {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: -0.3px;
}
.section-head p { color: var(--text-muted); font-size: 15.5px; }

/* ===== SERVIÇOS ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.service-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 30px 26px;
  transition: transform 0.2s, border-color 0.2s;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}
.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(59,130,246,0.12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.service-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.service-card p { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }
.service-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary);
  margin-top: auto;
  transition: gap 0.2s;
}
.service-link:hover { gap: 12px; }

/* ===== PORTFÓLIO ===== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.portfolio-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 30px;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}
.portfolio-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}
.portfolio-card .accent-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--primary);
}
.portfolio-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(59,130,246,0.12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.portfolio-icon.has-logo {
  width: 160px;
  height: 44px;
  background: transparent;
  justify-content: flex-start;
  padding: 0;
}
.portfolio-icon.has-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.portfolio-tag {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 4px;
}
.portfolio-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.portfolio-card p { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }
.portfolio-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-top: auto;
  transition: gap 0.2s;
}
.portfolio-link:hover { gap: 12px; }
button.portfolio-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

/* ===== DIFERENCIAIS ===== */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.benefit-card { text-align: center; padding: 10px; }
.benefit-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(59,130,246,0.12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 26px;
}
.benefit-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.benefit-card p { font-size: 14px; color: var(--text-muted); max-width: 300px; margin: 0 auto; }

/* ===== CTA FINAL ===== */
.cta-final { text-align: center; }
.cta-final h2 { font-size: 32px; font-weight: 700; margin-bottom: 14px; }
.cta-final p { color: var(--text-muted); margin-bottom: 32px; max-width: 480px; margin-left: auto; margin-right: auto; }
.cta-final .hero-actions { justify-content: center; }

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 44px 0;
  background: var(--bg-card-soft);
}
footer .container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}
footer .brand { font-size: 16px; }
footer .foot-links {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: var(--text-muted);
}
footer .foot-links a:hover { color: var(--text-main); }
footer .foot-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
footer .foot-contact a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); transition: color 0.2s; }
footer .foot-contact a:hover { color: var(--primary); }
footer .foot-muted { font-size: 13px; color: var(--text-muted); }

/* ===== BOTÃO FLUTUANTE WHATSAPP ===== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  width: 56px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  transition: transform 0.2s;
}
.whatsapp-float:hover { transform: scale(1.06); }
.whatsapp-float svg { height: 28px; width: 28px; }

/* ===== MODAL / FORMULÁRIO DE CONTATO ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
  overflow-y: auto;
}
.modal-overlay.active { display: flex; }

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 70px rgba(0,0,0,0.55);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-header h3 { font-size: 19px; font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}
.modal-close:hover { color: var(--text-main); }

.modal-card-center {
  position: relative;
  max-width: 400px;
  text-align: center;
  padding-top: 40px;
}
.modal-close-float {
  position: absolute;
  top: 14px;
  right: 14px;
}
.modal-center-icon {
  font-size: 46px;
  color: var(--primary);
  background: rgba(59,130,246,0.12);
  border-radius: 50%;
  padding: 14px;
  margin-bottom: 16px;
}
.modal-card-center h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.modal-card-center p { color: var(--text-muted); font-size: 14.5px; }

.modal-error {
  display: none;
  background: rgba(239,68,68,0.12);
  border: 1px solid var(--danger);
  color: var(--danger);
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
}
.modal-error.show { display: block; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--text-main);
  font-size: 14px;
  font-family: "Comfortaa", sans-serif;
  resize: vertical;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.form-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: opacity 0.3s;
  opacity: 0;
  pointer-events: none;
  max-width: 320px;
}
.toast.show { opacity: 1; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* ===== RESPONSIVO ===== */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid { grid-template-columns: 1fr; }
  .benefits-grid { grid-template-columns: 1fr; }

  .portfolio-icon.has-logo {
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg-card-soft);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 16px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
  }
  .nav-links a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--border); }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-actions .btn span.btn-label-full { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
}

@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .brand-logo { height: 36px; }
  .hero { padding: 110px 0 70px; }
  .hero h1 { font-size: 34px; }
  .hero p.lead { font-size: 16px; }
  .hero-actions { flex-direction: column; align-items: stretch; width: 100%; }
  .hero-actions .btn { justify-content: center; }
  .section { padding: 72px 0; }
  .section-head h2 { font-size: 26px; }
  .services-grid { grid-template-columns: 1fr; }
  footer .container { flex-direction: column; }
  .whatsapp-float { bottom: 16px; right: 16px; height: 52px; width: 52px; }
}
