/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue-primary: #1565C0;
  --blue-accent:  #42A5F5;
  --blue-light:   #64B5F6;
  --bg-dark:      #0A0F1E;
  --bg-surface:   #111827;
  --bg-card:      #1A2235;
  --text-white:   #FFFFFF;
  --text-muted:   #94A3B8;
  --text-body:    #CBD5E1;
  --border:       rgba(66, 165, 245, 0.15);
  --shadow-blue:  0 4px 32px rgba(21, 101, 192, 0.25);
  --radius:       12px;
  --radius-lg:    20px;
  --transition:   0.3s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text-body);
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a  { text-decoration: none; color: inherit; }

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

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-accent));
  color: #fff;
  box-shadow: 0 4px 20px rgba(21, 101, 192, 0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(21, 101, 192, 0.55);
}

.btn-outline {
  background: transparent;
  color: var(--blue-accent);
  border: 2px solid var(--blue-accent);
}
.btn-outline:hover {
  background: rgba(66, 165, 245, 0.1);
  transform: translateY(-2px);
}

/* ===== HEADER ===== */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 2px 0;
  background: rgba(10, 15, 30, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
header.scrolled {
  background: rgba(10, 15, 30, 0.95);
  border-bottom-color: var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo {
  height: 84px;
  width: auto;
  border-radius: 8px;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0 80px;
  background: radial-gradient(ellipse 80% 60% at 60% 40%, rgba(21,101,192,0.22) 0%, transparent 70%),
              var(--bg-dark);
}

.circuit-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero .container { position: relative; }

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero-content { max-width: none; }
.hero-visual   { position: relative; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(66, 165, 245, 0.12);
  border: 1px solid rgba(66, 165, 245, 0.3);
  color: var(--blue-accent);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 24px;
}
.hero-badge span { width: 6px; height: 6px; border-radius: 50%; background: var(--blue-accent); animation: pulse 2s infinite; }

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-white);
  margin-bottom: 20px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--blue-accent), var(--blue-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-slogan {
  font-size: 1rem;
  color: var(--blue-accent);
  letter-spacing: 0.03em;
  margin-bottom: 16px;
  font-weight: 500;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-body);
  margin-bottom: 36px;
  max-width: 560px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }

/* ===== SECTION COMMON ===== */
section { padding: 100px 0; }

.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 580px;
}

/* ===== SOBRE MIM ===== */
.sobre { background: var(--bg-surface); }

.sobre-inner {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 72px;
  align-items: center;
}

.foto-wrapper {
  position: relative;
  width: 280px;
  margin: 0 auto;
}
.foto-ring {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-accent));
  padding: 4px;
  box-shadow: var(--shadow-blue);
}
.foto-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 4px solid var(--bg-surface);
}
.foto-badge {
  position: absolute;
  bottom: 8px; right: -16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 0.82rem;
  color: var(--text-white);
  font-weight: 600;
  box-shadow: var(--shadow-blue);
  white-space: nowrap;
}
.foto-badge strong { color: var(--blue-accent); display: block; font-size: 1.1rem; }

.sobre-text .section-title { margin-bottom: 20px; }
.sobre-bio {
  font-size: 1.05rem;
  color: var(--text-body);
  margin-bottom: 32px;
  line-height: 1.8;
}

.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 36px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  min-width: 130px;
  text-align: center;
}
.stat-card .num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--blue-accent);
  line-height: 1;
}
.stat-card .lbl {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== SERVIÇOS ===== */
.servicos { background: var(--bg-dark); }
.servicos-header { text-align: center; margin-bottom: 60px; }
.servicos-header .section-subtitle { margin: 0 auto; }

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

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-primary), var(--blue-accent));
  opacity: 0;
  transition: var(--transition);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-blue); border-color: rgba(66,165,245,0.35); }
.service-card:hover::before { opacity: 1; }

.service-icon {
  width: 56px; height: 56px;
  background: rgba(21,101,192,0.18);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--blue-accent);
}
.service-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 12px;
}
.service-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}
.service-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 50px;
  background: rgba(66,165,245,0.1);
  color: var(--blue-accent);
  border: 1px solid rgba(66,165,245,0.2);
  font-weight: 500;
}

/* ===== STACK ===== */
.stack { background: var(--bg-surface); }
.stack-header { text-align: center; margin-bottom: 56px; }
.stack-header .section-subtitle { margin: 0 auto; }

.stack-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}
.tech-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 20px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-white);
  transition: var(--transition);
}
.tech-badge:hover {
  border-color: var(--blue-accent);
  background: rgba(66,165,245,0.08);
  transform: translateY(-2px);
}
.tech-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--blue-accent);
  flex-shrink: 0;
}

/* ===== CLIENTES ===== */
.clientes { background: var(--bg-dark); }
.clientes-header { text-align: center; margin-bottom: 60px; }
.clientes-header .section-subtitle { margin: 0 auto; }

.logos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.client-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  min-height: 120px;
}
.client-card:hover {
  border-color: rgba(66,165,245,0.35);
  box-shadow: var(--shadow-blue);
  transform: translateY(-4px);
}
.client-card img {
  max-height: 60px;
  width: auto;
  object-fit: contain;
  filter: grayscale(40%) brightness(1.1);
  transition: filter var(--transition);
}
.client-card:hover img { filter: grayscale(0%) brightness(1.15); }

/* ===== CTA FINAL ===== */
.cta-final {
  background: linear-gradient(135deg, #0D1B3E 0%, var(--blue-primary) 100%);
  padding: 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-final::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.cta-final .container { position: relative; }
.cta-final h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
}
.cta-final p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 40px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.btn-whatsapp {
  background: #25D366;
  color: #fff;
  box-shadow: 0 4px 24px rgba(37, 211, 102, 0.4);
  font-size: 1.05rem;
  padding: 16px 36px;
}
.btn-whatsapp:hover {
  background: #20bd5a;
  transform: translateY(-2px);
  box-shadow: 0 8px 36px rgba(37, 211, 102, 0.55);
}

/* ===== FOOTER ===== */
footer {
  background: #070B14;
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-logo { height: 52px; }
.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-wpp {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #25D366;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
}
.footer-wpp:hover { opacity: 0.8; }

/* ===== IDE WINDOW ===== */
.ide-window {
  font-family: 'Cascadia Code', 'Consolas', 'Courier New', monospace;
  background: #1e1e1e;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.07);
  overflow: hidden;
  box-shadow:
    0 32px 72px rgba(0,0,0,0.55),
    0 0 0 1px rgba(66,165,245,0.1),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

.ide-titlebar {
  background: #2d2d2d;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  user-select: none;
}
.dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }

.ide-tabs { display: flex; margin-left: 10px; gap: 1px; }
.ide-tab {
  font-size: 11.5px;
  padding: 4px 16px;
  color: #707070;
  border-radius: 4px 4px 0 0;
  cursor: default;
}
.ide-tab.active { background: #1e1e1e; color: #cccccc; }
.ide-tab.dim    { color: #444; }

.ide-body {
  height: 295px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.ide-body::-webkit-scrollbar { display: none; }

.ide-code {
  padding: 10px 0 8px;
  font-size: 12.5px;
  line-height: 1.68;
}

.code-line {
  display: flex;
  align-items: baseline;
  min-height: 21px;
  padding-right: 20px;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.1s ease, transform 0.1s ease;
  white-space: pre;
}
.code-line.visible { opacity: 1; transform: translateX(0); }
.code-line.current { background: rgba(66,165,245,0.07); }

.ln {
  display: inline-block;
  min-width: 38px;
  text-align: right;
  padding-right: 18px;
  color: #3d3d3d;
  font-size: 11px;
  flex-shrink: 0;
  user-select: none;
}

/* VS Code Dark+ syntax colors */
.kw   { color: #569cd6; }
.type { color: #4ec9b0; }
.nm   { color: #dcdcaa; }
.attr { color: #9cdcfe; }
.str  { color: #ce9178; }
.cm   { color: #6a9955; font-style: italic; }
.ns   { color: #9cdcfe; }
.num  { color: #b5cea8; }

.cursor {
  display: inline-block;
  width: 2px;
  height: 14px;
  background: #aeafad;
  vertical-align: text-bottom;
  margin-left: 1px;
  animation: cursorBlink 1s step-end infinite;
}
@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.ide-statusbar {
  background: #007acc;
  padding: 4px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: #fff;
  font-family: 'Segoe UI', system-ui, sans-serif;
  transition: background 0.7s ease;
}
.ide-statusbar.success { background: #2d8a4e; }
.status-left  { display: flex; gap: 16px; }
.status-branch::before { content: '⎇ '; }
.status-ok, .status-lang { opacity: 0.88; }

/* ===== ARCHITECTURE DIAGRAM ===== */
.arch-diagram {
  display: flex;
  align-items: center;
  margin-top: 16px;
  padding: 0 4px;
}
.arch-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 16px;
  min-width: 96px;
  flex-shrink: 0;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  color: var(--blue-accent);
}
.arch-node.visible { opacity: 1; transform: translateY(0); }
.arch-node-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.arch-connector {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 4px;
  margin-bottom: 20px;
  overflow: hidden;
}
.arch-line {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(21,101,192,0.4), rgba(66,165,245,0.7));
  border-radius: 1px;
  position: relative;
  overflow: hidden;
}
.arch-dot {
  position: absolute;
  top: -4px;
  left: -10px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--blue-accent);
  box-shadow: 0 0 8px var(--blue-accent);
  animation: dotTravel 2.4s linear infinite;
}
.arch-dot-2 { animation-delay: 1.2s; }
@keyframes dotTravel {
  0%   { left: -10px; opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* ===== ANIMATIONS ===== */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

.fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-up:nth-child(2) { transition-delay: 0.1s; }
.fade-up:nth-child(3) { transition-delay: 0.2s; }
.fade-up:nth-child(4) { transition-delay: 0.3s; }
.fade-up:nth-child(5) { transition-delay: 0.4s; }
.fade-up:nth-child(6) { transition-delay: 0.5s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1000px) {
  .hero-layout { grid-template-columns: 1fr; gap: 40px; }

  /* IDE — tamanho intermediário (tablet) */
  .ide-body { height: 245px; }
  .ide-code { font-size: 11.5px; }
  .ln { min-width: 30px; padding-right: 12px; }
}
@media (max-width: 900px) {
  .sobre-inner { grid-template-columns: 1fr; gap: 48px; text-align: center; }
  .foto-wrapper { margin: 0 auto; }
  .stats-row { justify-content: center; }
  .section-subtitle { margin: 0 auto; }
  .cards-grid { grid-template-columns: 1fr; }
  .logos-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  section { padding: 72px 0; }
  .hero { padding: 90px 0 56px; }
  .header-logo { height: 60px; }
  .footer-logo  { height: 40px; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .logos-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }

  /* IDE — mobile pequeno */
  .ide-window { border-radius: 10px; }
  .ide-body   { height: 205px; }
  .ide-code   { font-size: 10.5px; line-height: 1.58; }
  .ln         { min-width: 26px; padding-right: 10px; font-size: 10px; }
  .ide-tab.dim { display: none; }

  /* Arch diagram — compacto */
  .arch-node       { min-width: 78px; padding: 10px 10px; }
  .arch-node svg   { width: 18px; height: 18px; }
  .arch-node-label { font-size: 0.62rem; }
}
