:root {
  --bg: #0b0f1a;
  --surface: #121829;
  --surface-2: #182139;
  --text: #e6e9f2;
  --muted: #a9b0c3;
  --primary: #4f8cff;
  /* electric blue */
  --secondary: #5eead4;
  /* teal */
  --accent: #a78bfa;
  /* soft purple */
  --danger: #ef4444;
  --success: #22c55e;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu;
  color: var(--text);
  background: radial-gradient(1000px 600px at 10% -20%, rgba(79, 140, 255, .12), transparent),
    radial-gradient(800px 500px at 90% 10%, rgba(167, 139, 250, .10), transparent), var(--bg);
}

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

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

.container {
  width: min(1100px, 92%);
  margin: 0 auto
}

.center {
  text-align: center
}

.lead {
  color: var(--muted)
}

.sr-only {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden
}

.skip-link {
  position: absolute;
  left: -999px;
  top: -999px
}

.skip-link:focus {
  left: 10px;
  top: 10px;
  background: var(--primary);
  color: #000;
  padding: .5rem .75rem;
  border-radius: 8px
}

.site-header {
  position: sticky;
  top: 0;
  background: rgba(18, 24, 41, .7);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  z-index: 50
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0
}

.logo {
  height: 42px;
  width: auto
}

.logo.small {
  height: 24px
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  position: relative; /* novo */
  z-index: 200;       /* novo */
}

.nav-toggle .bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0
}

.nav {
  margin-left: auto
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0
}

.nav-list a {
  opacity: .85
}

.nav-list a:hover {
  opacity: 1
}

.nav-list>li>a:not(.btn) {
  display: inline-block;
  padding: .5rem 0
}

.nav-list .btn {
  padding: .55rem .9rem
}

/* Inline language dropdown */
.lang-dropdown {
  position: relative
}

.lang-btn {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, .12);
  padding: .5rem .6rem;
  border-radius: 10px;
  cursor: pointer;
  opacity: .85
}

.lang-btn:hover,
.lang-btn[aria-expanded="true"] {
  opacity: 1;
  background: linear-gradient(135deg, rgba(79, 140, 255, .2), rgba(94, 234, 212, .15));
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  list-style: none;
  margin: 0;
  padding: 6px;
  min-width: 200px;
  display: none;
  box-shadow: var(--shadow);
  z-index: 60
}

.dropdown-menu.open {
  display: block
}

.dropdown-item {
  display: block;
  padding: .55rem .6rem;
  border-radius: 8px;
  color: var(--text);
  opacity: .9
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, .06);
  opacity: 1
}

.dropdown-item.active {
  background: rgba(79, 140, 255, .20);
  border: 1px solid rgba(79, 140, 255, .35)
}

.hero {
  position: relative;
  min-height: 68vh;
  display: grid;
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid rgba(255, 255, 255, .08)
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
  opacity: .18
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 400px at 20% 30%, rgba(79, 140, 255, .12), transparent 60%),
    radial-gradient(600px 400px at 80% 30%, rgba(94, 234, 212, .18), transparent 60%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding: 72px 0
}

.hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  margin: 0 0 10px
}

.subtitle {
  color: var(--muted);
  font-size: clamp(16px, 2vw, 18px);
  margin: 0 0 20px
}

.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap
}

.btn {
  display: inline-block;
  padding: .75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  transition: transform .12s ease, background .2s ease
}

.btn:hover {
  transform: translateY(-1px)
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #6aa6ff);
  color: #081021
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: rgba(255, 255, 255, .18)
}

.section {
  padding: 64px 0;
  border-bottom: 0; /* avoid visual divider lines between sections */
}

/* Ensure a consistent background behind the About section */
.about {
  background:
    linear-gradient(140deg,
      rgba(79,140,255,.12) 0%,
      rgba(94,234,212,.10) 40%,
      rgba(167,139,250,.14) 100%),
    var(--surface);
  border-bottom: 1px solid rgba(255, 255, 255, .08); /* linha de divisão como no banner */
}
/* Keep other main sections consistent too */
.services { 
  /* Degradê suave usando a paleta: primary, secondary, accent sobre a base surface */
  background:
    linear-gradient(145deg,
      rgba(79,140,255,.18) 0%,
      rgba(94,234,212,.12) 45%,
      rgba(167,139,250,.18) 100%),
    var(--surface);
  padding-bottom: 96px; 
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.tech { 
  background: var(--surface); 
  border-bottom: 1px solid rgba(255, 255, 255, .08); /* nova linha divisória */
}
.contact { background: var(--surface); }

.grid.two {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 28px;
  align-items: center
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 22px
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow)
}

.card .icon {
  font-size: 22px
}

.card h3 {
  margin: 12px 0 6px
}

.card p {
  color: var(--muted);
  margin: 0
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 14px 0 0;
  padding: 0;
  list-style: none
}

.tech-list li {
  padding: .5rem .7rem;
  background: rgba(79, 140, 255, .12);
  border: 1px solid rgba(79, 140, 255, .25);
  border-radius: 999px
}

.contact .form-wrap {
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow)
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px
}

.field input,
.field textarea {
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  color: var(--text);
  padding: .7rem .8rem
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid rgba(79, 140, 255, .5);
  border-color: rgba(79, 140, 255, .5)
}

.alert {
  border-radius: 12px;
  padding: .75rem 1rem;
  margin-bottom: 12px
}

.alert.error {
  background: rgba(239, 68, 68, .14);
  border: 1px solid rgba(239, 68, 68, .35)
}

.alert.success {
  background: rgba(34, 197, 94, .14);
  border: 1px solid rgba(34, 197, 94, .35)
}

.form-note {
  color: var(--muted);
  font-size: .9rem
}

.site-footer {
  /* fundo uniforme sem degradê/efeito diferente */
  background: var(--bg);
  padding: 28px 0 24px;
  border-top: 1px solid rgba(255,255,255,.05); /* linha discreta opcional */
}

.footer-inner {
  /* remover linha anterior mais marcada */
  border-top: none; /* sobrescreve a linha definida antes */
  padding-top: 0;   /* ajusta espaçamento após remover a borda interna */
}

/* Esconde o bloco social no desktop */
.mobile-social { display: none; }

/* Prevent scroll quando menu aberto */
body.no-scroll { overflow: hidden; }

/* Scroll reveal base */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.22,.61,.36,1); will-change: opacity, transform; }
.reveal.reveal-in { opacity: 1; transform: translateY(0); }
/* Variante para atraso escalonado */
.reveal[data-delay] { transition-delay: var(--r-delay,0ms); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity:1 !important; transform:none !important; transition:none !important; } }

/* Hero sizing overrides */
.hero { min-height: clamp(620px, 82vh, 900px); }
@media (max-width: 920px) { .hero { min-height: clamp(560px, 90dvh, 880px); } }
@media (max-width: 620px) {
  .hero { min-height: calc(100dvh - 60px); }
  .hero-inner { padding: 64px 0 72px; }
}
@supports (height: 100dvh) {
  @media (max-width: 620px) { .hero { min-height: calc(100dvh - 60px); } }
}

/* Responsive */
@media (max-width: 920px) {
  .grid.two {
    grid-template-columns: 1fr;
  }

  .cards {
    grid-template-columns: repeat(2, 1fr)
  }
}

@media (max-width: 620px) {
  .nav-toggle { display: block }

  /* Off-canvas 80% da largura, ancorado à direita */
  .nav-list {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;              /* novo */
    width: 80vw;             /* novo: antes era 100vw */
    height: 100vh;
    background: var(--surface-2);
    border: 0;
    border-radius: 0;
    padding: 24px;
    flex-direction: column;
    gap: 10px;
    display: flex;
    transform: translateX(100%);
    transition: transform .28s ease;
    z-index: 100;
    pointer-events: none;
    will-change: transform;
    overscroll-behavior: contain;
    box-shadow: -20px 0 40px rgba(0,0,0,.35); /* novo: separação visual */
    border-left: 1px solid rgba(255,255,255,.08); /* novo */
  }
  .nav-list.open {
    transform: translateX(0);
    pointer-events: auto;
  }
  body.menu-open .nav-list {
    transform: translateX(0);
    pointer-events: auto;
  }

  /* Overlay mais leve para não escurecer demais */
  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.2); /* antes: .4 */
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 90;
  }
  .nav-overlay.active,
  body.menu-open .nav-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  /* Fallback robusto: abrir quando o body estiver em estado menu-open */
  body.menu-open .nav-list {
    transform: translateX(0);
    pointer-events: auto;
  }

  /* Overlay (fallback para caso a classe .active falhe) */
  body.menu-open .nav-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  /* O nav deixa de ser o containing block */
  .site-header .nav { position: static }

  /* Itens maiores e mais clicáveis */
  .nav-list > li > a:not(.btn) {
    padding: 14px 4px;
    font-size: 18px;
  }

  /* Dropdown de idioma dentro do painel */
  .dropdown-menu {
    position: static;
    display: none;
    margin-top: 6px;
  }
  .dropdown-menu.open { display: block; }

  /* Overlay */
  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 90;
  }
  .nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  /* Bloco social no rodapé do painel */
  .nav-list .mobile-social {
    display: block;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.08);
  }
  .ig-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    opacity: .9;
  }
  .ig-link:hover { opacity: 1; }
  .ig-link svg { width: 24px; height: 24px; }
}

/* Visual polish tweaks */
.about .media {
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px; /* opcional: garante altura mínima do bloco */
}
.about .media img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 320px; /* limite de altura */
  margin: 0 auto;
  object-fit: contain; /* mantém proporção e centraliza */
}
.section.services { 
  padding-bottom: 96px; 
  border-bottom: 1px solid rgba(255, 255, 255, .08); /* antes: 0 */
}
.section.tech {
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

/* Hero: camada de fundo e terminal com efeito de digitação */
    .hero { position: relative; overflow: hidden; }
    .hero .hero-inner { position: relative; z-index: 3; }
    .hero .hero-gradient { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
    .hero .bg-fx { z-index: 0; }
    /* Terminal full-bleed por trás do texto */
    .hero .terminal-bg {
      position: absolute; inset: 0; z-index: 1; pointer-events: none;
      font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
      color: #9fb7d0;      /* antes: #cfefff (um pouco mais escuro) */
      opacity: .12;        /* antes: .18 (mais transparente) */
      mix-blend-mode: screen;
    }
    .hero .terminal-bg pre {
      position: absolute; inset: 0; margin: 0;
      padding: clamp(12px, 3vw, 32px);
      white-space: pre-wrap;
      line-height: 1.4;
      font-size: clamp(10px, 2.2vw, 14px);
      overflow: auto;
      -ms-overflow-style: none; scrollbar-width: none;
    }
    .hero .terminal-bg pre::-webkit-scrollbar { display: none; }
    .terminal-bg .line {
      opacity: .80;        /* antes: .95 */
      text-shadow: 0 0 4px rgba(120, 200, 255, .06); /* antes: 0 0 6px rgba(120,200,255,.15) */
    }
    /* Cores já usadas no mini-terminal reaproveitadas aqui */
    .terminal-bg .prompt { color:#7ee787; }
    .terminal-bg .cmd { color:#a5d6ff; }
    .terminal-bg .dim { color:#8b9cb8; }

    /* Hero: camada de fundo e terminal com efeito de digitação */
    .hero { position: relative; overflow: hidden; }
    .hero .bg-fx {
      position:absolute; inset:0; pointer-events:none; z-index:0;
      background:
        radial-gradient(1200px 600px at 10% 0%, rgba(0,255,170,.12), transparent 60%),
        radial-gradient(900px 600px at 100% 100%, rgba(0,140,255,.12), transparent 60%),
        repeating-linear-gradient(0deg, rgba(255,255,255,.03), rgba(255,255,255,.03) 1px, transparent 1px, transparent 3px);
      animation: bgShift 18s linear infinite;
      mix-blend-mode: screen;
    }
    @keyframes bgShift {
      0% { background-position: 0 0, 0 0, 0 0; }
      50% { background-position: 20% 10%, -10% -10%, 0 6px; }
      100% { background-position: 0 0, 0 0, 0 0; }
    }
    @media (prefers-reduced-motion: reduce) {
      .hero .bg-fx { animation:none; }
    }

/* Overrides finais para o off-canvas mobile */
@media (max-width: 620px) {
  /* Painel fechado */
  .nav-list {
    transform: translateX(110%);
    box-shadow: none;
    border-left: 0;
    z-index: 1000;
  }
  /* Painel aberto: garantir que esteja acima do overlay e receba cliques */
  .nav-list.open,
  body.menu-open .nav-list {
    transform: translateX(0);
    pointer-events: auto;
    box-shadow: -20px 0 40px rgba(0,0,0,.35);
    border-left: 1px solid rgba(255,255,255,.08);
    z-index: 1001; /* acima do overlay */
  }

  /* Overlay mais suave e NÃO cobrindo o painel (cobre só os 20vw restantes) */
  .nav-overlay {
    background: rgba(0,0,0,.2) !important;
    z-index: 900;
  }
  body.menu-open .nav-overlay {
    left: 0;
    right: 80vw; /* deixa livre a área do painel (80vw) */
    opacity: 1;
    pointer-events: auto;
  }
}

/* Ajustes desktop: aproximar texto e imagem no bloco Cloud Servers */
@media (min-width: 921px) {
  .about .grid.two {
    grid-template-columns: .8fr 1.2fr; /* texto ganha mais espaço, vem mais à esquerda */
    gap: 20px;                          /* diminui o espaço entre as colunas */
  }
  .about .media {
    justify-content: flex-end;          /* imagem encosta mais no texto */
  }
}

/* Novos estilos para o bloco Cloud */
.cloud-copy h2 {
  font-size: clamp(30px,3.2vw,40px);
  background: linear-gradient(90deg,var(--primary),var(--secondary));
  -webkit-background-clip: text;
  color: transparent;
  margin-top: 0;
  position: relative;
}
.cloud-copy h2::after {
  content: "";
  display: block;
  width: 72px;
  height: 3px;
  margin: 10px 0 18px;
  background: linear-gradient(90deg,var(--primary),var(--accent));
  border-radius: 2px;
}
.cloud-copy p { line-height: 1.55; }
.cloud-copy p:first-of-type { font-size: 1.05rem; color: var(--muted); }
.cloud-features { list-style: none; margin: 18px 0 26px; padding: 0; display: grid; gap: 10px; }
.cloud-features li {
  position: relative;
  padding: 10px 14px 10px 46px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  font-size: .94rem;
  line-height: 1.4;
  overflow: hidden;
}
.cloud-features li::before {
  content: "";
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border-radius: 6px;
  background: linear-gradient(135deg,var(--primary),var(--secondary));
  box-shadow: 0 0 0 3px rgba(79,140,255,.25), 0 4px 10px -2px rgba(0,0,0,.6);
}
.cloud-features li::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 300px at 0% 0%, rgba(94,234,212,.08), transparent 70%);
  opacity: 0; transition: opacity .4s ease;
}
.cloud-features li:hover::after { opacity: 1; }
.cloud-copy strong { color: var(--secondary); }

.contact-highlights { list-style: none; margin: 22px 0 28px; padding: 0; display: grid; gap: 12px; }
.contact-highlights li {
  position: relative;
  padding: 10px 12px 10px 46px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  font-size: .95rem;
  line-height: 1.45;
  overflow: hidden;
}
.contact-highlights li::before {
  content: "";
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border-radius: 6px;
  background: linear-gradient(135deg,var(--primary),var(--secondary));
  box-shadow: 0 0 0 3px rgba(79,140,255,.25), 0 4px 10px -2px rgba(0,0,0,.6);
}
.contact-highlights li::after { content:""; position:absolute; inset:0; background: radial-gradient(500px 260px at 0% 0%, rgba(94,234,212,.10), transparent 70%); opacity:0; transition:opacity .4s ease; }
.contact-highlights li:hover::after { opacity:1; }