:root {
  --navy: #0A2647;
  --navy-2: #123A63;
  --navy-light: #1D4E82;
  --blue: #1565C0;
  --blue-2: #2F86EB;
  --blue-light: #4CA3F5;
  --gray-900: #1f2937;
  --gray-700: #45566B;
  --gray-500: #6b7f94;
  --gray-300: #C7D3E0;
  --gray-100: #F3F6FA;
  --white: #ffffff;
  --border: #E1E7EF;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 2px 8px rgba(10,38,71,0.06);
  --shadow: 0 8px 24px rgba(10,38,71,0.08);
  --shadow-lg: 0 20px 48px rgba(10,38,71,0.16);

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 96px;

  --font-heading: 'Poppins', Arial, sans-serif;
  --font-body: 'Inter', Arial, sans-serif;

  --transition: 0.25s cubic-bezier(.4,0,.2,1);

  --bg: var(--white);
  --bg-alt: var(--gray-100);
  --surface: var(--white);
  --text-heading: var(--navy);
  --text-body: var(--gray-700);
  --text-muted: var(--gray-500);
  --border-color: var(--border);
}

[data-theme="dark"] {
  --bg: #0A121C;
  --bg-alt: #0F1A28;
  --surface: #101B2A;
  --text-heading: #F2F6FB;
  --text-body: #C4D2E0;
  --text-muted: #8FA3B8;
  --border-color: rgba(255,255,255,0.1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text-body);
  line-height: 1.65;
  background: var(--bg);
  overflow-x: hidden;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; line-height: 1.25; }

a { text-decoration: none; color: inherit; }

ul { list-style: none; }

img { max-width: 100%; display: block; }

button { font-family: inherit; }

.gradient {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Reveal on scroll ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

/* ===== Section divider ===== */
.section-divider {
  width: 100%;
  height: 1px;
  position: relative;
  overflow: hidden;
}

.section-divider::before {
  content: '';
  position: absolute;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--blue), var(--blue-light), transparent);
  animation: dividerSlide 2.2s ease forwards;
  animation-play-state: paused;
}

.section-divider.visible::before { animation-play-state: running; }

@keyframes dividerSlide {
  0% { left: -100%; opacity: 0; }
  20% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* ===== Topbar ===== */
.topbar {
  background: var(--navy);
  color: var(--gray-300);
  font-size: 0.85rem;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 36px;
}

.topbar-inner a { color: var(--gray-300); transition: color var(--transition); }
.topbar-inner a:hover { color: var(--blue-light); }

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), height var(--transition);
}

.header.scrolled {
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  transition: height var(--transition);
  gap: 24px;
}

.header.scrolled .header-inner { height: 66px; }

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--text-heading);
  flex-shrink: 0;
}

.logo-mark { width: 34px; height: 28px; flex-shrink: 0; }

.logo-text strong { color: var(--blue); font-weight: 700; }

.nav {
  display: flex;
  gap: 32px;
}

.nav-link {
  position: relative;
  font-weight: 500;
  color: var(--text-body);
  padding: 6px 0;
  transition: color var(--transition);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--blue);
  transition: width var(--transition);
}

.nav-link:hover { color: var(--text-heading); }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link.active { color: var(--text-heading); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.btn-header {
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  color: var(--white);
  padding: 11px 22px;
  flex-shrink: 0;
}

.btn-header:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(21,101,192,0.35); }

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  color: var(--white);
  box-shadow: 0 8px 20px rgba(21,101,192,0.3);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(21,101,192,0.42); }

.btn-outline {
  border-color: var(--navy);
  color: var(--navy);
}

.btn-outline:hover { background: var(--navy); color: var(--white); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--bg-alt);
  cursor: pointer;
  flex-shrink: 0;
  font-size: 1.1rem;
  transition: transform var(--transition), background-color 0.15s;
}

.theme-toggle:hover { transform: rotate(15deg); background: var(--border-color); }

.nav-close { display: none; }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.menu-toggle span {
  display: block;
  height: 2px;
  width: 24px;
  background: var(--text-heading);
  transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,38,71,0.45);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition);
}

.nav-backdrop.open {
  opacity: 1;
  visibility: visible;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 130px 0 100px;
  overflow: hidden;
  background: var(--navy);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 800px 500px at 15% 20%, rgba(47,134,235,0.2), transparent 60%),
    radial-gradient(ellipse 700px 500px at 90% 80%, rgba(29,78,130,0.6), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  will-change: transform;
}

.blob-1 { width: 340px; height: 340px; background: var(--blue); top: -80px; left: 8%; animation: blobDrift 16s ease-in-out infinite; }
.blob-2 { width: 260px; height: 260px; background: var(--blue-light); bottom: -60px; right: 12%; animation: blobDrift 20s ease-in-out infinite reverse; }
.blob-3 { width: 200px; height: 200px; background: var(--blue-2); top: 40%; left: 55%; animation: blobDrift 24s ease-in-out infinite; }

@keyframes blobDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.08); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-inner { position: relative; z-index: 1; }

.hero-content { max-width: 680px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: 99px;
  border: 1px solid rgba(76,163,245,0.4);
  background: rgba(21,101,192,0.14);
  backdrop-filter: blur(10px);
  font-size: 0.85rem;
  font-weight: 600;
  color: #BFDCFB;
  margin-bottom: 28px;
  letter-spacing: 0.02em;
}

.hero-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--blue-light);
  box-shadow: 0 0 10px var(--blue-light);
  flex-shrink: 0;
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

.hero-name {
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero-typewriter {
  font-size: clamp(1.05rem, 2.6vw, 1.35rem);
  font-weight: 600;
  color: var(--blue-light);
  min-height: 1.6em;
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--blue-light);
  animation: blink 0.8s step-end infinite;
  margin-left: 2px;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--gray-300);
  margin-bottom: 34px;
  max-width: 560px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.hero .btn-outline {
  border-color: rgba(255,255,255,0.5);
  color: var(--white);
}

.hero .btn-outline:hover { background: var(--white); color: var(--navy); }

.hero-domain {
  color: var(--gray-300);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0.6;
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.hero-scroll span {
  display: block;
  width: 1px;
  height: 44px;
  background: linear-gradient(180deg, transparent, var(--blue-light));
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
  100% { opacity: 0; transform: scaleY(1); transform-origin: bottom; }
}

/* ===== Section common ===== */
.tag {
  display: block;
  text-align: center;
  color: var(--blue);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-title {
  text-align: center;
  font-size: 2.1rem;
  color: var(--text-heading);
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 56px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Servicos / Bento grid ===== */
.servicos { padding: var(--space-6) 0; }

.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 700px) { .bento-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .bento-grid { grid-template-columns: repeat(3, 1fr); } .bento-wide { grid-column: span 2; } }

.service-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
  opacity: 0;
  transition: opacity var(--transition);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

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

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  margin-bottom: 20px;
  transition: transform var(--transition);
}

.card-icon svg { width: 26px; height: 26px; fill: var(--blue-light); }

.service-card:hover .card-icon { transform: scale(1.08) rotate(-3deg); }

.card-icon.icon-roller,
.card-icon.icon-predial { width: 64px; height: 64px; background: none; }

.card-icon.icon-roller svg,
.card-icon.icon-predial svg { width: 56px; height: 56px; }

.roller-shine { animation: rollerShine 2.6s ease-in-out infinite; }
@keyframes rollerShine { 0%,100% { opacity: 0.6; } 50% { opacity: 1; } }
.roller-drip { animation: rollerDrip 2.4s ease-in-out infinite; }
@keyframes rollerDrip { 0%,100% { opacity: 0.3; stroke-dashoffset: 0; } 50% { opacity: 0.7; } }

.predial-led { animation: ledBlink 2.4s ease-in-out infinite; }
.predial-led-2 { animation-delay: 0.5s; }
.predial-led-3 { animation-delay: 1s; }
@keyframes ledBlink { 0%, 40%, 100% { opacity: 0.15; } 20% { opacity: 1; } }

.service-card h3 { margin-bottom: 10px; color: var(--text-heading); font-size: 1.1rem; }
.service-card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 18px; }

.service-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.svc-tag {
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(21,101,192,0.1);
  color: var(--blue);
  border: 1px solid rgba(21,101,192,0.2);
}
[data-theme="dark"] .svc-tag { color: var(--blue-light); background: rgba(76,163,245,0.12); border-color: rgba(76,163,245,0.25); }

/* ===== Diferenciais ===== */
.diferenciais {
  background: var(--bg-alt);
  padding: var(--space-6) 0;
}

.diff-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.diff-item {
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.diff-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.diff-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(21,101,192,0.1);
  margin: 0 auto 18px;
}

.diff-icon svg { width: 26px; height: 26px; fill: var(--blue); }
[data-theme="dark"] .diff-icon svg { fill: var(--blue-light); }

.diff-item h3 { font-size: 1.02rem; color: var(--text-heading); margin-bottom: 8px; }
.diff-item p { color: var(--text-muted); font-size: 0.9rem; }

/* ===== Processo / Pipeline ===== */
.processo { padding: var(--space-6) 0; }

.flow-header { margin-bottom: 56px; }

.pipeline-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

@media (max-width: 900px) { .pipeline-wrapper { flex-direction: column; } }

.pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  min-width: 0;
}

.pipeline-step-inner {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 26px 16px 22px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  width: 100%;
  max-width: 170px;
}

@media (max-width: 900px) { .pipeline-step-inner { max-width: 280px; } }

.pipeline-step:hover .pipeline-step-inner {
  border-color: var(--blue);
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.pipeline-icon { font-size: 2rem; margin-bottom: 12px; display: block; }
.pipeline-label { font-size: 0.9rem; font-weight: 700; color: var(--text-heading); margin-bottom: 6px; }
.pipeline-desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }

.pipeline-connector {
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 901px) { .pipeline-connector { width: 40px; height: 2px; } }
@media (max-width: 900px) { .pipeline-connector { width: 2px; height: 40px; } }

.connector-line {
  position: absolute;
  background: linear-gradient(90deg, rgba(21,101,192,0.35), rgba(76,163,245,0.35));
  border-radius: 2px;
}

@media (min-width: 901px) { .connector-line { width: 100%; height: 2px; top: 50%; transform: translateY(-50%); } }
@media (max-width: 900px) { .connector-line { height: 100%; width: 2px; left: 50%; transform: translateX(-50%); background: linear-gradient(180deg, rgba(21,101,192,0.35), rgba(76,163,245,0.35)); } }

.connector-arrow {
  position: absolute;
  color: rgba(21,101,192,0.7);
  font-size: 14px;
  z-index: 1;
}
[data-theme="dark"] .connector-arrow { color: rgba(76,163,245,0.8); }

@media (min-width: 901px) { .connector-arrow { right: -4px; top: 50%; transform: translateY(-50%); } }
@media (max-width: 900px) { .connector-arrow { bottom: -4px; left: 50%; transform: translateX(-50%) rotate(90deg); } }

/* ===== Galeria ===== */
.galeria { padding: var(--space-6) 0; }

.galeria-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.galeria-item {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  background: var(--bg-alt);
  border: 2px dashed var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
}

/* ===== CTA ===== */
.cta {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  padding: var(--space-5) 0;
}

.cta-inner { text-align: center; }

.cta h2 { color: var(--white); font-size: 1.9rem; margin-bottom: 14px; }
.cta p { color: var(--gray-300); margin-bottom: 30px; font-size: 1.05rem; }

/* ===== Contato ===== */
.contato { padding: var(--space-6) 0; background: var(--bg-alt); }

.contato-cards {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.contato-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 30px 32px;
  text-align: center;
  width: 230px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.contato-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.contato-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(21,101,192,0.1);
  color: var(--blue);
  margin: 0 auto 16px;
}
[data-theme="dark"] .contato-icon { color: var(--blue-light); background: rgba(76,163,245,0.15); }

.contato-card h3 { color: var(--text-heading); margin-bottom: 6px; }
.contato-card p { color: var(--text-muted); }

.contato-email {
  font-size: 0.85rem;
  word-break: break-word;
}

.contato-card-fone { cursor: default; }
.contato-card-fone h3 { font-size: 1.02rem; }

.contato-card-acoes {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.contato-mini-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}

.contato-mini-whatsapp { background: #25D366; color: var(--white); }
.contato-mini-whatsapp:hover { background: #1fb959; transform: translateY(-1px); }

.contato-mini-tel {
  background: var(--bg-alt);
  color: var(--text-heading);
  border-color: var(--border-color);
}
.contato-mini-tel:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-1px); }
[data-theme="dark"] .contato-mini-tel:hover { border-color: var(--blue-light); color: var(--blue-light); }

/* ===== Footer ===== */
.footer {
  background: var(--navy);
  color: var(--gray-300);
  padding: 48px 0 28px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--white);
}

.footer-brand .logo-text strong { color: var(--blue-light); }

.footer-nav {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a { color: var(--gray-300); transition: color var(--transition); font-size: 0.92rem; }
.footer-nav a:hover { color: var(--blue-light); }

.footer-copy {
  font-size: 0.85rem;
  color: var(--gray-500);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 22px;
  width: 100%;
  line-height: 1.8;
}

.footer-copy a { color: var(--blue-light); font-weight: 600; transition: color var(--transition); }
.footer-copy a:hover { color: var(--white); }

/* ===== Floating buttons ===== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  background: #25D366;
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(0,0,0,0.25);
  z-index: 999;
  transition: transform var(--transition);
}

.whatsapp-float:hover { transform: scale(1.08); }

.back-to-top {
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}

.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--navy-light); }

/* ===== Responsive ===== */
@media (max-width: 1000px) {
  .diff-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .galeria-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .topbar-inner { font-size: 0.78rem; }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(320px, 80vw);
    background: var(--surface);
    flex-direction: column;
    align-items: flex-start;
    padding: 32px;
    gap: 28px;
    box-shadow: -10px 0 30px rgba(0,0,0,0.12);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(.4,0,.2,1);
    z-index: 999;
  }

  .nav.open { transform: translateX(0); }

  .nav-backdrop { display: block; }

  .nav-close {
    display: flex;
    align-items: center;
    gap: 8px;
    align-self: flex-end;
    background: none;
    border: none;
    color: var(--text-body);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 8px 0 24px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    justify-content: flex-end;
  }

  .nav-close:hover { color: var(--blue); }

  .menu-toggle { display: flex; }

  .btn-header { display: none; }

  .hero { padding: 90px 0 70px; }

  .hero-tagline { font-size: 1rem; }

  .section-title { font-size: 1.6rem; }

  .diff-grid { grid-template-columns: 1fr; }

  .galeria-grid { grid-template-columns: 1fr; }

  .contato-card { width: 100%; }

  .cta h2 { font-size: 1.5rem; }

  .footer-nav { gap: 18px; }
}

@media (max-width: 400px) {
  .hero-buttons { flex-direction: column; width: 100%; }
  .hero-buttons .btn { width: 100%; }
  .topbar-inner span:first-child { display: none; }
  .topbar-inner { justify-content: center; }
}

/* ===================================================================
   GALERIA DE PROJETOS
   =================================================================== */

/* --- Hero interno (galeria / projeto) --- */
.pagina-hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
  padding: 60px 0 56px;
}

.pagina-hero .container { position: relative; z-index: 1; }

.pagina-hero h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  color: var(--white);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.pagina-hero > .container > p {
  color: var(--gray-300);
  max-width: 620px;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--gray-300);
  margin-bottom: 16px;
  opacity: 0.85;
}

.breadcrumb a { color: var(--blue-light); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb span { margin: 0 6px; opacity: 0.5; }

.pagina-hero-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 22px;
  font-size: 0.9rem;
  color: var(--gray-300);
}

.pagina-hero-stats strong { color: var(--blue-light); font-size: 1.15rem; font-family: var(--font-heading); }

/* --- Detalhes do projeto no hero --- */
.projeto-detalhes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  margin-bottom: 18px;
}

.projeto-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 99px;
  background: rgba(76,163,245,0.18);
  border: 1px solid rgba(76,163,245,0.4);
  color: #BFDCFB;
  font-size: 0.8rem;
  font-weight: 600;
}

.projeto-detalhe { color: var(--gray-300); font-size: 0.9rem; }
.projeto-detalhe strong { color: var(--white); font-weight: 600; }

.projeto-descricao {
  color: var(--gray-300);
  max-width: 720px;
  line-height: 1.8;
  margin-top: 6px;
}

/* --- Filtros --- */
.filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 44px;
}

.filtro-btn {
  padding: 9px 20px;
  border-radius: 99px;
  border: 1px solid var(--border-color);
  background: var(--surface);
  color: var(--text-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.filtro-btn:hover { border-color: var(--blue); color: var(--blue); }

.filtro-btn.ativo {
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  border-color: transparent;
  color: var(--white);
  box-shadow: 0 6px 16px rgba(21,101,192,0.3);
}

.filtro-vazio { text-align: center; color: var(--text-muted); padding: 40px 0; }

/* --- Grade de projetos --- */
.galeria-completa { padding: var(--space-6) 0; }

.projetos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px;
}

.projeto-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.projeto-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.projeto-capa {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-alt);
}

.projeto-capa img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(.4,0,.2,1);
}

.projeto-card:hover .projeto-capa img { transform: scale(1.06); }

.projeto-capa-vazia {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  opacity: 0.35;
}

.projeto-servico {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 13px;
  border-radius: 99px;
  background: rgba(10,38,71,0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.projeto-info { padding: 22px 24px 24px; }

.projeto-info h3 {
  font-size: 1.08rem;
  color: var(--text-heading);
  margin-bottom: 6px;
  line-height: 1.35;
}

.projeto-cliente {
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 8px;
}

[data-theme="dark"] .projeto-cliente { color: var(--blue-light); }

.projeto-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 14px;
  line-height: 1.6;
}

.projeto-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.projeto-data { margin-left: auto; }

.galeria-cta { text-align: center; margin-top: 48px; }

/* --- Grade de mídias dentro do projeto --- */
.midias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.midia-item {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4/3;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.midia-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.midia-item:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.midia-item img,
.midia-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.midia-video { background: var(--navy); }

.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(21,101,192,0.9);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
  transition: transform var(--transition), background var(--transition);
  pointer-events: none;
}

.midia-item:hover .video-play { transform: translate(-50%, -50%) scale(1.12); background: var(--blue-2); }

.video-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 3px 10px;
  border-radius: 99px;
  background: rgba(10,38,71,0.85);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 600;
  pointer-events: none;
}

.midia-legenda {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px 14px 12px;
  background: linear-gradient(to top, rgba(10,38,71,0.92), transparent);
  color: var(--white);
  font-size: 0.8rem;
  text-align: left;
  pointer-events: none;
}

/* --- Navegação entre projetos --- */
.projeto-navegacao {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

.projeto-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 45%;
  transition: transform var(--transition);
}

.projeto-nav-link:hover { transform: translateX(-3px); }
.projeto-nav-proximo { text-align: right; align-items: flex-end; }
.projeto-nav-proximo:hover { transform: translateX(3px); }

.projeto-nav-link span { font-size: 0.78rem; color: var(--blue); font-weight: 600; }
[data-theme="dark"] .projeto-nav-link span { color: var(--blue-light); }
.projeto-nav-link strong { color: var(--text-heading); font-size: 0.95rem; font-family: var(--font-heading); }

/* --- Estado vazio --- */
.estado-vazio {
  text-align: center;
  padding: 70px 20px;
  max-width: 460px;
  margin: 0 auto;
}

.estado-vazio-icone { font-size: 3.2rem; margin-bottom: 18px; opacity: 0.55; }
.estado-vazio h2 { color: var(--text-heading); font-size: 1.4rem; margin-bottom: 10px; }
.estado-vazio p { color: var(--text-muted); margin-bottom: 26px; }

/* ===================================================================
   LIGHTBOX
   =================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(4,14,25,0.95);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.lightbox.aberto { opacity: 1; visibility: visible; }

.lightbox-conteudo {
  max-width: min(1200px, 92vw);
  max-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-conteudo img,
.lightbox-conteudo video {
  max-width: 100%;
  max-height: 82vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 24px 70px rgba(0,0,0,0.6);
  display: block;
}

.lightbox-fechar {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: var(--white);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  z-index: 2;
}

.lightbox-fechar:hover { background: rgba(255,255,255,0.25); transform: rotate(90deg); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition);
  z-index: 2;
}

.lightbox-nav:hover { background: var(--blue); }
.lightbox-anterior { left: 20px; }
.lightbox-proximo { right: 20px; }

.lightbox-rodape {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--gray-300);
  font-size: 0.85rem;
  padding: 0 70px;
  text-align: center;
}

.lightbox-contador {
  padding: 4px 12px;
  border-radius: 99px;
  background: rgba(255,255,255,0.1);
  font-size: 0.78rem;
  flex-shrink: 0;
}

body.lightbox-ativo { overflow: hidden; }

@media (max-width: 700px) {
  .lightbox-nav { width: 42px; height: 42px; font-size: 1.6rem; }
  .lightbox-anterior { left: 10px; }
  .lightbox-proximo { right: 10px; }
  .lightbox-rodape { padding: 0 20px; flex-direction: column; gap: 8px; bottom: 14px; }
  .projeto-navegacao { flex-direction: column; }
  .projeto-nav-link { max-width: 100%; }
  .projeto-nav-proximo { text-align: left; align-items: flex-start; }
  .midias-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .pagina-hero-stats { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .blob, .roller-shine, .roller-drip, .predial-led { animation: none !important; }
  html { scroll-behavior: auto; }
}
