/* ============================================================
   AguiarXTech — styles.css
   Tema: espaço / galáxia em tons de azul.
   Organizado por seção. Edite as variáveis em :root para
   mudar cores rapidamente.
   ============================================================ */

/* ---------- VARIÁVEIS GLOBAIS (paleta e medidas) ---------- */
:root {
  /* Fundo */
  --bg-deep: #050814;     /* azul-marinho quase preto */
  --bg-soft: #0a0f24;     /* azul escuro um pouco mais claro */

  /* Acentos */
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --accent-grad: linear-gradient(135deg, #22d3ee 0%, #3b82f6 100%);

  /* Texto */
  --text: #e8eefc;
  --text-dim: #9fb0d0;

  /* Vidro (glassmorphism) */
  --glass-bg: rgba(20, 30, 60, 0.35);
  --glass-border: rgba(120, 180, 255, 0.18);

  /* Medidas */
  --maxw: 1100px;
  --radius: 18px;
  --nav-h: 70px;

  /* Brilho (glow) */
  --glow-cyan: 0 0 22px rgba(34, 211, 238, 0.55);
}

/* ---------- RESET BÁSICO ---------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  /* Diz ao navegador que o tema é escuro: deixa a barra de rolagem e os
     fundos padrão escuros, eliminando a "moldura clara" nas bordas. */
  color-scheme: dark;
  /* O gradiente fica no HTML (e não no body) para que o canvas das estrelas,
     que tem z-index negativo, apareça por cima dele. Isso também evita a
     "faixa branca" ao rolar além do limite (overscroll). */
  background: radial-gradient(ellipse at 50% 0%, #0c1633 0%, var(--bg-soft) 35%, var(--bg-deep) 100%);
  background-color: var(--bg-deep); /* fallback escuro */
  background-attachment: fixed;
  /* Impede o efeito de "repique"/rubber-band no topo e no fim da página */
  overscroll-behavior: none;
}

body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  /* O body fica transparente: o gradiente está no <html> e o canvas das
     estrelas (z-index negativo) aparece atrás do conteúdo. */
  background: transparent;
  line-height: 1.6;
  overflow-x: hidden;
  overscroll-behavior: none;
}

/* Títulos principais e nome da empresa: Oxanium (tech/futurista e legível) */
h1, h2, h3, .brand-name { font-family: "Oxanium", "Inter", sans-serif; }

/* Barra de rolagem escura (Chrome/Edge/Safari e Firefox) */
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
  background: #1b2747;
  border-radius: 10px;
  border: 3px solid var(--bg-deep);
}
::-webkit-scrollbar-thumb:hover { background: #28406e; }
html { scrollbar-color: #1b2747 var(--bg-deep); scrollbar-width: thin; }

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

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

.accent {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- CANVAS DO CÉU ESTRELADO ---------- */
#space-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;          /* sempre atrás do conteúdo */
  pointer-events: none; /* não bloqueia cliques */
}

/* ---------- LINK DE ACESSIBILIDADE (pular para o conteúdo) ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--cyan);
  color: #001018;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  z-index: 1000;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- CONTAINER ---------- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   1) MENU FIXO NO TOPO
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  z-index: 100;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

/* Classe adicionada via JS quando a página é rolada */
.navbar.scrolled {
  background: rgba(5, 8, 20, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
}

.nav-inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(var(--glow-cyan)); }
.brand-name { font-weight: 700; font-size: 1.15rem; letter-spacing: 0.5px; }

.nav-links { list-style: none; display: flex; gap: 28px; }
.nav-links a {
  position: relative;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.25s ease;
}
.nav-links a:hover,
.nav-links a:focus-visible { color: var(--text); }
/* Sublinhado animado */
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--accent-grad);
  transition: width 0.25s ease;
}
.nav-links a:hover::after,
.nav-links a:focus-visible::after { width: 100%; }

/* Botão hambúrguer (escondido no desktop) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 26px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ============================================================
   2) HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--nav-h) 24px 40px;
  position: relative;
}

.hero-content {
  /* animação de entrada */
  animation: heroIn 1.1s ease both;
}

.hero-logo {
  width: min(280px, 60vw);
  height: auto;
  margin: 0 auto 18px;
  filter: drop-shadow(0 0 40px rgba(34, 211, 238, 0.45));
  animation: float 6s ease-in-out infinite;
}

.hero-title {
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  font-weight: 900;
  letter-spacing: 1px;
}

.hero-tagline {
  margin: 14px 0 32px;
  font-size: clamp(1rem, 2.6vw, 1.4rem);
  color: var(--text-dim);
}

/* Indicador de rolagem (mousinho) */
.scroll-cue {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
}
.scroll-cue .mouse {
  display: block;
  width: 24px; height: 40px;
  border: 2px solid var(--text-dim);
  border-radius: 14px;
  position: relative;
}
.scroll-cue .mouse::before {
  content: "";
  position: absolute;
  top: 8px; left: 50%;
  width: 4px; height: 8px;
  background: var(--cyan);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: wheel 1.6s ease-in-out infinite;
}

/* ---------- BOTÕES ---------- */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-glow {
  background: var(--accent-grad);
  color: #03121c;
  box-shadow: 0 0 0 rgba(34, 211, 238, 0);
}
.btn-glow:hover,
.btn-glow:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(34, 211, 238, 0.6);
}

.btn-outline {
  border: 1px solid var(--cyan);
  color: var(--text);
  background: rgba(34, 211, 238, 0.06);
}
.btn-outline:hover,
.btn-outline:focus-visible {
  background: rgba(34, 211, 238, 0.16);
  box-shadow: var(--glow-cyan);
  transform: translateY(-3px);
}

/* ============================================================
   SEÇÕES GENÉRICAS
   ============================================================ */
.section {
  padding: 90px 0;
  position: relative;
}

.section-title {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 18px;
}

.section-lead {
  max-width: 720px;
  margin: 0 auto 40px;
  text-align: center;
  color: var(--text-dim);
  font-size: 1.08rem;
}

/* ---------- GLASSMORPHISM (cards translúcidos) ---------- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius);
}

/* ============================================================
   3) SOBRE — estatísticas
   ============================================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 10px;
}
.stat {
  padding: 28px 18px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.stat:hover { transform: translateY(-6px); box-shadow: var(--glow-cyan); }
.stat-num {
  display: block;
  font-family: "Oxanium", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { color: var(--text-dim); font-size: 0.95rem; }

/* ============================================================
   APRESENTAÇÃO / FUNDADOR
   ============================================================ */
.profile {
  display: flex;
  align-items: center;
  gap: 38px;
  max-width: 880px;
  margin: 0 auto;
  padding: 34px;
}

/* Moldura da foto (círculo com brilho ciano) */
.profile-photo {
  flex: 0 0 auto;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  padding: 4px;
  background: var(--accent-grad);
  box-shadow: var(--glow-cyan);
}
.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;        /* preenche o círculo sem distorcer */
  border-radius: 50%;
  display: block;
  background: var(--bg-soft);
}
/* Espaço reservado quando a foto ainda não existe (mostra um ícone) */
.profile-photo.no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-photo.no-photo::after {
  content: "👤";
  font-size: 4rem;
  filter: grayscale(0.2);
}

.profile-text { text-align: left; }
.profile-name { font-size: 1.7rem; margin-bottom: 4px; }
.profile-role {
  color: var(--cyan);
  font-weight: 600;
  margin-bottom: 14px;
}
.profile-bio { color: var(--text-dim); margin-bottom: 22px; }
.profile-links { display: flex; gap: 12px; flex-wrap: wrap; }
.profile-links .btn { padding: 10px 22px; font-size: 0.95rem; }

/* Em telas pequenas: empilha a foto sobre o texto, centralizado */
@media (max-width: 720px) {
  .profile { flex-direction: column; text-align: center; padding: 28px 22px; }
  .profile-text { text-align: center; }
  .profile-links { justify-content: center; }
}

/* ============================================================
   4) e 5) CARDS (Projetos e Serviços)
   ============================================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.cards.services {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  position: relative;
  padding: 34px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
/* Glow no hover */
.card:hover {
  transform: translateY(-8px);
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 18px 50px rgba(34, 211, 238, 0.25);
}

.card-logo-wrap {
  width: 130px; height: 130px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.card-logo {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(34, 211, 238, 0.35));
  transition: transform 0.35s ease;
}
.card:hover .card-logo { transform: scale(1.06); }

.card-title { font-size: 1.3rem; margin-bottom: 12px; }
.card-text { color: var(--text-dim); font-size: 0.98rem; margin-bottom: 22px; }
.card .btn { margin-top: auto; }

/* Selo "Em breve" */
.badge {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--accent-grad);
  color: #03121c;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 5px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  box-shadow: var(--glow-cyan);
}

/* Ícones dos serviços */
.icon {
  font-size: 2.2rem;
  width: 70px; height: 70px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  border-radius: 16px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid var(--glass-border);
  font-family: "Oxanium", monospace;
}

/* ============================================================
   6) CONTATO
   ============================================================ */
.contact { text-align: center; }
.contact-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0 auto 36px;
  max-width: 820px;
}
.contact-card {
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.contact-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: var(--glow-cyan);
}
.contact-icon { font-size: 1.8rem; }
.contact-label { font-weight: 600; }
.contact-value { color: var(--text-dim); font-size: 0.9rem; word-break: break-word; }

/* ============================================================
   7) RODAPÉ
   ============================================================ */
.footer {
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid var(--glass-border);
  color: var(--text-dim);
  background: rgba(5, 8, 20, 0.4);
  backdrop-filter: blur(6px);
}
.footer-tag {
  margin-top: 6px;
  font-family: "Oxanium", sans-serif;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================================================
   SCROLL REVEAL (animação de entrada das seções)
   A classe .is-visible é adicionada via IntersectionObserver
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes heroIn {
  from { opacity: 0; transform: translateY(30px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}
@keyframes wheel {
  0%   { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 12px); }
}

/* ============================================================
   RESPONSIVO (mobile-first ajustes)
   ============================================================ */
@media (max-width: 860px) {
  .cards,
  .cards.services,
  .stats,
  .contact-links {
    grid-template-columns: 1fr;
  }

  /* Menu mobile */
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-h); right: 0;
    flex-direction: column;
    gap: 0;
    width: 220px;
    padding: 10px 0;
    background: rgba(5, 8, 20, 0.92);
    backdrop-filter: blur(14px);
    border-left: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    border-radius: 0 0 0 14px;
    transform: translateX(110%);
    transition: transform 0.3s ease;
  }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 14px 24px; }
  /* Aberto via JS */
  .nav-links.open { transform: translateX(0); }

  /* Anima o hambúrguer para "X" quando aberto */
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ============================================================
   ACESSIBILIDADE — prefers-reduced-motion
   Desativa animações para quem prefere menos movimento.
   (Os cometas também são desativados no script.js)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
