/* ========================================
   NIOTECH.IO — GLOBAL STYLES
   ======================================== */

:root {
  --primary: #4ECDC4;
  --secondary: #7B68EE;
  --accent: #45B7D1;
  --dark: #07071A;
  --dark2: #0D0D2B;
  --dark3: #111133;
  --card: #12122E;
  --card2: #16163A;
  --border: rgba(255,255,255,0.07);
  --text: #E8E8F4;
  --text-muted: #8888AA;
  --gradient: linear-gradient(135deg, #4ECDC4, #7B68EE);
  --gradient-text: linear-gradient(135deg, #4ECDC4 0%, #7B68EE 100%);
  --nav-height: 72px;
  --radius: 16px;
  --radius-sm: 10px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

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

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

/* ======================================
   UTILITIES
   ====================================== */

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

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ======================================
   SCROLL REVEAL
   ====================================== */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ======================================
   BUTTONS
   ====================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 24px rgba(78, 205, 196, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(78, 205, 196, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-large {
  padding: 18px 48px;
  font-size: 1.125rem;
}

.btn-full {
  width: 100%;
}

/* ======================================
   NAVBAR
   ====================================== */

#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
  background: rgba(7, 7, 26, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.nav-logo img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  background: var(--gradient) !important;
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 50px;
  font-weight: 600 !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(78, 205, 196, 0.3);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background: rgba(7, 7, 26, 0.98);
  backdrop-filter: blur(20px);
  padding: 16px 24px 24px;
  gap: 16px;
}

.mobile-menu a {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}

.mobile-menu a:last-child {
  border-bottom: none;
  color: var(--primary);
}

.mobile-menu.open {
  display: flex;
}

/* ======================================
   HERO
   ====================================== */

#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--nav-height);
}

#particles {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 80px 24px 60px;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(78, 205, 196, 0.1);
  border: 1px solid rgba(78, 205, 196, 0.25);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 50px;
  margin-bottom: 28px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

.hero-content h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

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

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.4;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 1;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  animation: scrollBounce 1.5s infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(6px); }
}

/* ======================================
   NÚMEROS
   ====================================== */

#numeros {
  padding: 60px 0;
  background: var(--dark2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.stat-card {
  text-align: center;
  padding: 32px 24px;
  border-right: 1px solid var(--border);
  transition: opacity 0.7s, transform 0.7s;
}

.stat-card:last-child {
  border-right: none;
}

.stat-number {
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  font-weight: 900;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-plus {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 900;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ======================================
   SECTION HEADERS
   ====================================== */

section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(78, 205, 196, 0.1);
  border: 1px solid rgba(78, 205, 196, 0.2);
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ======================================
   SERVICES
   ====================================== */

#servicos {
  background: var(--dark2);
}

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

.service-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 30px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, opacity 0.7s, translate 0.7s;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(78, 205, 196, 0.3);
  box-shadow: 0 16px 48px rgba(78, 205, 196, 0.08);
}

.service-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 24px;
}

.service-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.service-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.service-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.service-features li {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-left: 20px;
  position: relative;
}

.service-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gradient);
}

/* ======================================
   COMO FUNCIONA
   ====================================== */

#como-funciona {
  background: var(--dark);
}

.steps-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 720px;
  margin: 0 auto;
}

.step {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 4px 20px rgba(78, 205, 196, 0.3);
}

.step-content {
  padding-top: 12px;
  padding-bottom: 8px;
}

.step-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.step-content p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.step-connector {
  width: 2px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(78, 205, 196, 0.4), rgba(123, 104, 238, 0.4));
  margin-left: 29px;
}

/* ======================================
   PROJETOS
   ====================================== */

#projetos {
  background: var(--dark2);
}

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

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(78, 205, 196, 0.25);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.project-visual {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-visual svg {
  width: 80px;
  height: 80px;
}

.proj-purple {
  background: linear-gradient(135deg, #2D1B69, #4A3090);
}

.proj-teal {
  background: linear-gradient(135deg, #0D4A46, #1A6B65);
}

.proj-blue {
  background: linear-gradient(135deg, #0D2340, #1A3D6B);
}

.proj-gradient {
  background: linear-gradient(135deg, #1A0D40, #2D1B69, #0D3A4A);
}

.project-info {
  padding: 24px;
}

.project-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  display: block;
  margin-bottom: 10px;
}

.project-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}

.project-info p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ======================================
   DIFERENCIAIS
   ====================================== */

#diferenciais {
  background: var(--dark);
}

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

.diff-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.diff-card:hover {
  transform: translateY(-4px);
  border-color: rgba(123, 104, 238, 0.3);
  box-shadow: 0 12px 40px rgba(123, 104, 238, 0.08);
}

.diff-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 20px;
}

.diff-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.35;
}

.diff-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ======================================
   TECNOLOGIAS
   ====================================== */

#tecnologias {
  background: var(--dark2);
  overflow: hidden;
}

.tech-scroll-wrapper {
  overflow: hidden;
  margin-top: 16px;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.tech-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: techScroll 28s linear infinite;
}

@keyframes techScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.tech-badge {
  flex-shrink: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s;
}

.tech-badge:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ======================================
   CTA BANNER
   ====================================== */

#cta-banner {
  padding: 0;
  background: var(--dark);
}

.cta-inner {
  background: linear-gradient(135deg, rgba(78, 205, 196, 0.12), rgba(123, 104, 238, 0.12));
  border-top: 1px solid rgba(78, 205, 196, 0.15);
  border-bottom: 1px solid rgba(78, 205, 196, 0.15);
  padding: 80px 24px;
  text-align: center;
}

.cta-inner h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.cta-inner p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ======================================
   CONTATO
   ====================================== */

#contato {
  background: var(--dark2);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 48px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: rgba(78, 205, 196, 0.08);
  border: 1px solid rgba(78, 205, 196, 0.15);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.contact-icon svg {
  width: 100%;
  height: 100%;
}

.contact-item strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.contact-item span {
  font-size: 0.95rem;
  color: var(--text);
}

.contact-promise {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.contact-promise strong {
  color: var(--primary);
}

.contact-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--dark);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 12px 16px;
  transition: border-color 0.2s;
  outline: none;
  width: 100%;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
}

.form-group select {
  appearance: none;
  cursor: pointer;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  opacity: 0.7;
}

/* ======================================
   FOOTER
   ====================================== */

#footer {
  background: var(--dark);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-logo {
  height: 44px;
  width: auto;
  margin-bottom: 20px;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 260px;
}

.footer-links h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ======================================
   RESPONSIVE
   ====================================== */

@media (max-width: 1024px) {
  .services-grid,
  .projects-grid,
  .diff-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .stat-card:nth-child(2) {
    border-right: none;
  }

  .stat-card:nth-child(3) {
    border-right: 1px solid var(--border);
  }

  .stat-card:nth-child(3),
  .stat-card:nth-child(4) {
    border-top: 1px solid var(--border);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  section {
    padding: 72px 0;
  }

  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

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

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

  .stat-card:nth-child(2) {
    border-right: none;
  }

  .stat-card:nth-child(3) {
    border-right: 1px solid var(--border);
  }

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

  .contact-form {
    padding: 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-brand {
    grid-column: auto;
  }

  .steps-container {
    padding: 0 8px;
  }
}

@media (max-width: 480px) {
  :root {
    --nav-height: 64px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    text-align: center;
  }

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

  .stat-card {
    padding: 24px 16px;
  }
}

/* ======================================
   LANGUAGE SWITCHER
   ====================================== */

.lang-switcher {
  display: flex;
  gap: 2px;
  align-items: center;
}

.lang-btn {
  background: none;
  border: 1.5px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.25rem;
  padding: 4px 7px;
  line-height: 1;
  transition: border-color 0.2s, transform 0.15s, opacity 0.2s;
  opacity: 0.45;
  color: inherit;
}

.lang-btn:hover {
  opacity: 1;
  transform: scale(1.15);
}

.lang-btn.active {
  border-color: var(--primary);
  opacity: 1;
}

.mobile-lang {
  display: flex;
  gap: 8px;
  padding: 12px 0 4px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.mobile-lang .lang-btn {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--card);
  border: 1.5px solid var(--border);
  opacity: 0.7;
  color: var(--text-muted);
}

.mobile-lang .lang-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  opacity: 1;
}
