/* =========================
   RESET BÁSICO E CONFIGURAÇÕES GERAIS
========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Definição de scroll suave para navegação entre âncoras */
html {
  scroll-behavior: smooth;
}

/* Variáveis globais para manter consistência visual */
:root {
  --bg: #09111a;
  --bg-soft: #101b27;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.12);
  --text: #f4f7fb;
  --text-soft: #a8b6c8;
  --primary: #2b7fff;
  --primary-hover: #1f6fe6;
  --accent: #7fa8d8;
  --metal: #c4ccd6;
  --success: #4ade80;
  --danger: #ff6b6b;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1180px;
}

/* Estilo base do corpo da página */
body {
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(43, 127, 255, 0.18), transparent 25%),
    linear-gradient(180deg, #081018 0%, #0b1622 40%, #0a121b 100%);
  color: var(--text);
  line-height: 1.6;
}

/* Classe utilitária para centralizar conteúdo */
.container {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
}

/* Espaçamento padrão das seções */
.section {
  padding: 72px 0;
}

/* Títulos principais */
h1, h2, h3, h4 {
  font-family: "Poppins", sans-serif;
  line-height: 1.2;
}

/* Imagens responsivas */
img {
  max-width: 100%;
  display: block;
}

/* Links padrão */
a {
  color: inherit;
  text-decoration: none;
}

/* =========================
   BOTÕES
========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 600;
  transition: 0.3s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #5f9cff);
  color: white;
  box-shadow: 0 10px 30px rgba(43, 127, 255, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--primary-hover), #4e91ff);
}

.btn-secondary {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
}

/* =========================
   CABEÇALHO
========================== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(14px);
  background: rgba(6, 12, 20, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-family: "Poppins", sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.nav {
  display: none;
  gap: 22px;
}

.nav a {
  color: var(--text-soft);
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav a:hover {
  color: var(--text);
}

.nav-cta {
  display: none;
}

/* =========================
   HERO
========================== */
.hero {
  padding-top: 96px;
  min-height: 92vh;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  gap: 32px;
}

.tag,
.section-kicker {
  display: inline-block;
  margin-bottom: 14px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.85rem;
  font-weight: 600;
}

.hero h1 {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.hero p {
  color: var(--text-soft);
  font-size: 1rem;
  max-width: 620px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-card {
  width: 100%;
  max-width: 420px;
  padding: 28px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.08) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 1s ease;
}

.hero-card:hover::before {
  transform: translateX(100%);
}

.hero-card-label {
  color: var(--accent);
  font-size: 0.88rem;
  margin-bottom: 10px;
}

.hero-card h3 {
  font-size: 1.7rem;
  margin-bottom: 10px;
}

.hero-card p {
  color: var(--text-soft);
}

/* =========================
   CABEÇALHOS DE SEÇÃO
========================== */
.section-header {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-header h2 {
  font-size: 1.8rem;
  margin-bottom: 14px;
}

.section-header p {
  color: var(--text-soft);
}

/* =========================
   SOBRE FLEXOGRAFIA
========================== */
.about-grid {
  display: grid;
  gap: 18px;
}

.info-box {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: 0.3s ease;
}

.info-box:hover {
  transform: translateY(-4px);
  background: var(--surface-strong);
}

.info-box h3 {
  margin-bottom: 12px;
}

.info-box p {
  color: var(--text-soft);
}

/* =========================
   SOLUÇÕES / CARDS
========================== */
.cards-grid {
  display: grid;
  gap: 20px;
}

.machine-card {
  position: relative;
  padding: 26px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid var(--border);
  transition: 0.35s ease;
  overflow: hidden;
}

.machine-card:hover {
  transform: translateY(-6px);
  border-color: rgba(43, 127, 255, 0.4);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.2);
}

.machine-card.featured {
  background:
    linear-gradient(180deg, rgba(43,127,255,0.18), rgba(255,255,255,0.04));
}

.card-top-line {
  width: 64px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--metal), var(--primary));
  margin-bottom: 18px;
}

.machine-card h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.machine-subtitle {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 16px;
}

.machine-card ul {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.machine-card li {
  color: var(--text-soft);
  padding-left: 18px;
  position: relative;
}

.machine-card li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary);
}

.card-link {
  font-weight: 700;
  color: #9bc0ff;
}

/* =========================
   GALERIA
========================== */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.gallery-grid img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--border);
  transition: 0.35s ease;
}

.gallery-grid img:hover {
  transform: scale(1.02);
  filter: brightness(1.08);
}

/* =========================
   CONTATO
========================== */
.contact-grid {
  display: grid;
  gap: 28px;
}

.contact-info p {
  color: var(--text-soft);
}

.contact-points {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.contact-form {
  padding: 24px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.form-group label {
  margin-bottom: 8px;
  font-weight: 600;
}

.form-group input {
  min-height: 50px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0 14px;
  outline: none;
  transition: 0.3s ease;
}

.form-group input:focus {
  border-color: rgba(43, 127, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(43, 127, 255, 0.12);
}

.form-message {
  margin-top: 14px;
  font-size: 0.95rem;
  min-height: 22px;
}

/* =========================
   RODAPÉ
========================== */
.footer {
  padding: 36px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(0, 0, 0, 0.15);
}

.footer-content {
  display: grid;
  gap: 18px;
}

.footer-content p {
  color: var(--text-soft);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--accent);
}

.footer-links a:hover {
  color: white;
}

/* =========================
   CHATBOT FLUTUANTE
========================== */
.chat-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1100;
  border: none;
  border-radius: 999px;
  min-width: 72px;
  min-height: 56px;
  padding: 0 20px;
  background: linear-gradient(135deg, var(--primary), #5f9cff);
  color: white;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 16px 35px rgba(43, 127, 255, 0.35);
  transition: transform 0.3s ease;
}

.chat-toggle:hover {
  transform: translateY(-3px);
}

.chat-window {
  position: fixed;
  right: 18px;
  bottom: 88px;
  width: calc(100% - 36px);
  max-width: 360px;
  background: #0d1722;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  z-index: 1100;
  display: none;
}

.chat-window.active {
  display: block;
  animation: fadeUp 0.35s ease;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: linear-gradient(135deg, rgba(43,127,255,0.22), rgba(255,255,255,0.05));
  border-bottom: 1px solid var(--border);
}

.chat-header h4 {
  margin-bottom: 2px;
}

.chat-header span {
  color: var(--text-soft);
  font-size: 0.85rem;
}

.chat-close {
  border: none;
  background: transparent;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
}

.chat-body {
  max-height: 280px;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-message {
  padding: 12px 14px;
  border-radius: 14px;
  max-width: 88%;
  font-size: 0.95rem;
}

.chat-message.bot {
  background: rgba(255,255,255,0.07);
  color: var(--text);
  align-self: flex-start;
}

.chat-message.user {
  background: rgba(43,127,255,0.25);
  color: white;
  align-self: flex-end;
}

.chat-form {
  display: flex;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid var(--border);
}

.chat-form input {
  flex: 1;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: white;
  padding: 0 12px;
  outline: none;
}

.chat-form button {
  border: none;
  border-radius: 12px;
  min-width: 86px;
  background: var(--primary);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

/* =========================
   ANIMAÇÕES DE ENTRADA
========================== */
.fade-in {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 0.12s;
}

.delay-2 {
  transition-delay: 0.24s;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   RESPONSIVIDADE
========================== */
@media (min-width: 768px) {
  .section {
    padding: 92px 0;
  }

  .hero h1 {
    font-size: 3.4rem;
  }

  .hero-actions {
    flex-direction: row;
    align-items: center;
  }

  .about-grid,
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1.05fr 1fr;
    align-items: start;
  }

  .footer-content {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .footer-links {
    align-items: flex-end;
  }
}

@media (min-width: 992px) {
  .nav {
    display: flex;
  }

  .nav-cta {
    display: inline-flex;
  }

  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
  }

  .section-header h2 {
    font-size: 2.5rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-grid img {
    height: 260px;
  }
}