/* ==========================================================================
   KUBIFY — Design System
   Fonte: Kubify_Conteudo_Mestre_Website_v1.0.docx (paleta e tipografia oficiais)
   ========================================================================== */

:root {
  /* Paleta oficial Kubify */
  --k-black: #0D0D0F;        /* fundo principal */
  --k-black-2: #1A1A1F;      /* superfícies / blocos */
  --k-blue: #0057FF;         /* Azul Kubify — destaques, CTAs, links */
  --k-blue-hover: #2E71FF;
  --k-blue-dim: rgba(0, 87, 255, 0.14);
  --k-gray-mid: #6B6B6F;     /* linhas / texto de apoio */
  --k-gray-light: #E5E5E7;   /* divisões / áreas secundárias */
  --k-white: #FFFFFF;

  /* Papéis semânticos */
  --bg: var(--k-black);
  --bg-elevated: var(--k-black-2);
  --border: rgba(229, 229, 231, 0.12);
  --border-strong: rgba(229, 229, 231, 0.24);
  --text: var(--k-white);
  --text-muted: #A6A6AA;
  --text-faint: var(--k-gray-mid);
  --accent: var(--k-blue);

  /* Tipografia */
  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-bold: 700;
  --fw-extrabold: 800;

  /* Layout */
  --container: 1180px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --header-h: 76px;

  /* Sombra / elevação sutil sobre fundo escuro */
  --shadow-md: 0 12px 32px -12px rgba(0, 0, 0, 0.55);
  --shadow-blue: 0 16px 40px -16px rgba(0, 87, 255, 0.45);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: var(--fw-regular);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

ul, ol { margin: 0; padding: 0; list-style: none; }

button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4, p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

@media (min-width: 900px) {
  .container { padding-inline: 40px; }
}

/* ---------- Tipografia ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: '';
  width: 18px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

h1, .h1 {
  font-weight: var(--fw-extrabold);
  font-size: clamp(2.4rem, 5vw + 1rem, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h2, .h2 {
  font-weight: var(--fw-extrabold);
  font-size: clamp(1.9rem, 3vw + 1rem, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
}

h3, .h3 {
  font-weight: var(--fw-bold);
  font-size: clamp(1.15rem, 1vw + 1rem, 1.4rem);
  line-height: 1.3;
}

.lede {
  font-size: clamp(1.05rem, 1vw + 0.9rem, 1.25rem);
  color: var(--text-muted);
  font-weight: var(--fw-regular);
  max-width: 60ch;
}

p.muted, .muted { color: var(--text-muted); }

.text-accent { color: var(--accent); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 999px;
  font-weight: var(--fw-bold);
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: var(--k-white);
  box-shadow: var(--shadow-blue);
}

.btn-primary:hover { background: var(--k-blue-hover); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-ghost {
  background: transparent;
  color: var(--accent);
  padding: 10px 4px;
}

.btn-ghost::after {
  content: '→';
  transition: transform 0.18s ease;
}

.btn-ghost:hover::after { transform: translateX(4px); }

.btn-block { width: 100%; }

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- Acessibilidade ---------- */
.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 200;
  background: var(--accent);
  color: var(--k-white);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: var(--fw-bold);
  transition: top 0.18s ease;
}

.skip-link:focus { top: 16px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 15, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  height: 40px;
}

.brand img { height: 100%; width: auto; }

.nav-links {
  display: none;
  align-items: center;
  gap: 34px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  position: relative;
  padding: 6px 0;
  transition: color 0.15s ease;
}

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

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

.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-actions .btn { padding: 12px 22px; font-size: 0.9rem; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.nav-toggle svg { width: 20px; height: 20px; }

.nav-toggle .icon-close { display: none; }

@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
}

/* Mobile menu */
.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--bg);
  z-index: 90;
  padding: 28px 24px 40px;
  display: none;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

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

.mobile-nav a {
  padding: 16px 4px;
  font-size: 1.25rem;
  font-weight: var(--fw-bold);
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.mobile-nav a.active { color: var(--accent); }

.mobile-nav .header-actions {
  margin-top: 24px;
  flex-direction: column;
  align-items: stretch;
}

body.nav-open { overflow: hidden; }

body.nav-open .nav-toggle .icon-menu { display: none; }
body.nav-open .nav-toggle .icon-close { display: inline-flex; }

/* ---------- Hex pattern background ---------- */
.hex-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='96' viewBox='0 0 84 96'%3E%3Cpath d='M42 0 84 24 84 72 42 96 0 72 0 24Z' fill='none' stroke='rgba(229,229,231,0.06)' stroke-width='1'/%3E%3C/svg%3E");
  background-position: center top;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 85%);
  pointer-events: none;
}

.glow {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 87, 255, 0.35), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}

/* ---------- Sections ---------- */
section { position: relative; }

.section {
  padding: 88px 0;
}

.section-tight { padding: 56px 0; }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 48px;
  max-width: 720px;
}

.section-head.center { align-items: center; text-align: center; margin-inline: auto; }

.section-alt { background: var(--bg-elevated); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover { border-color: var(--border-strong); }

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--k-blue-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.card-icon svg { width: 26px; height: 26px; }

.grid {
  display: grid;
  gap: 22px;
}

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

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Badge / tag ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--k-blue-dim);
  color: #6E9DFF;
  border: 1px solid rgba(0, 87, 255, 0.35);
}

.badge-soon {
  background: rgba(229, 229, 231, 0.08);
  color: var(--text-muted);
  border-color: var(--border-strong);
}

.badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}

/* ---------- Hero ---------- */
.hero {
  padding: 76px 0 96px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 12px;
}

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 48px; }
  .hero-inner { order: 1; }
  .hero-visual { order: 2; }
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 800px;
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0 32px;
}

.hero-visual-glow {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 87, 255, 0.32), transparent 70%);
  filter: blur(10px);
}

.hero-mark {
  position: relative;
  width: min(260px, 62vw);
  filter: drop-shadow(0 30px 50px rgba(0, 87, 255, 0.3));
}

@media (min-width: 960px) {
  .hero-mark { width: min(340px, 26vw); }
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.hero-meta div { display: flex; flex-direction: column; gap: 2px; }

.hero-meta strong { font-size: 1rem; font-weight: var(--fw-bold); }

.hero-meta span { font-size: 0.85rem; color: var(--text-faint); }

/* ---------- Page header (páginas internas) ---------- */
.page-hero {
  padding: 56px 0 64px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.page-hero .container { position: relative; z-index: 1; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-faint);
  margin-bottom: 20px;
}

.breadcrumb a:hover { color: var(--accent); }

.page-hero-mark {
  display: none;
  position: absolute;
  top: 50%;
  right: -40px;
  width: 300px;
  height: 300px;
  transform: translateY(-50%);
  opacity: 0.16;
  pointer-events: none;
}

@media (min-width: 960px) {
  .page-hero-mark { display: block; }
}

/* ---------- Pilares / territórios ---------- */
.territory-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
}

.territory-card .card-icon { margin-bottom: 4px; }

.territory-card ul { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }

.territory-card li {
  font-size: 0.92rem;
  color: var(--text-muted);
  padding-left: 18px;
  position: relative;
}

.territory-card li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Steps (como funciona) ---------- */
.steps {
  display: grid;
  gap: 20px;
  counter-reset: step;
}

@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(5, 1fr); }
}

.step {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  position: relative;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--k-white);
  font-weight: var(--fw-extrabold);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

/* ---------- FAQ accordion ---------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: none;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: var(--fw-bold);
  text-align: left;
}

.faq-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.faq-icon::before, .faq-icon::after {
  content: '';
  position: absolute;
  background: var(--text-muted);
  transition: background 0.25s ease;
}

.faq-icon::before { width: 10px; height: 1.5px; }
.faq-icon::after { width: 1.5px; height: 10px; }

.faq-item[open] .faq-icon { background: var(--accent); border-color: var(--accent); transform: rotate(180deg); }
.faq-item[open] .faq-icon::before,
.faq-item[open] .faq-icon::after { background: var(--k-white); }
.faq-item[open] .faq-icon::after { opacity: 0; }

.faq-answer { padding: 0 24px 22px; color: var(--text-muted); max-width: 68ch; }

.faq-question::-webkit-details-marker { display: none; }

/* ---------- Formulário de contato ---------- */
.form-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }

.form-field label { font-size: 0.88rem; font-weight: var(--fw-bold); }

.form-field input,
.form-field textarea,
.form-field select {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.96rem;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--accent);
}

.form-hint { font-size: 0.82rem; color: var(--text-faint); margin-top: -6px; margin-bottom: 20px; }

.contact-channel {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  transition: border-color 0.2s ease;
}

.contact-channel:hover { border-color: var(--border-strong); }

.contact-channel .card-icon { margin: 0; flex-shrink: 0; }

.contact-channel div { display: flex; flex-direction: column; gap: 2px; }

.contact-channel strong { font-size: 1rem; }

.contact-channel span { font-size: 0.88rem; color: var(--text-muted); }

/* ---------- CTA banner ---------- */
.cta-banner {
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #0A1330, #071026 60%, #0D0D0F);
  border: 1px solid rgba(0, 87, 255, 0.35);
  padding: 52px 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  position: relative;
  overflow: hidden;
}

.cta-banner-text { max-width: 520px; display: flex; flex-direction: column; gap: 12px; position: relative; z-index: 1; }

.cta-banner .hero-cta { position: relative; z-index: 1; margin-top: 0; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}

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

@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-logo img { width: 36px; height: 36px; flex-shrink: 0; }

.footer-logo span {
  font-size: 1.15rem;
  font-weight: var(--fw-extrabold);
  letter-spacing: 0.02em;
}

.footer-brand p { color: var(--text-muted); font-size: 0.92rem; max-width: 320px; }

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 16px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 12px; }

.footer-col a { color: var(--text-muted); font-size: 0.94rem; }

.footer-col a:hover { color: var(--accent); }

.footer-social { display: flex; gap: 10px; margin-top: 18px; }

.footer-social a {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
}

.footer-social a:hover { border-color: var(--accent); color: var(--accent); }

.footer-social svg { width: 17px; height: 17px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* ---------- WhatsApp floating button ---------- */
.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px -8px rgba(37, 211, 102, 0.6);
  transition: transform 0.18s ease;
}

.whatsapp-float:hover { transform: scale(1.08); }

.whatsapp-float svg { width: 28px; height: 28px; fill: #fff; }

/* ---------- Reveal on scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Utilities ---------- */
.stack { display: flex; flex-direction: column; }
.gap-sm { gap: 12px; }
.gap-md { gap: 20px; }
.gap-lg { gap: 32px; }
.mt-lg { margin-top: 32px; }
.text-center { text-align: center; }
.divider { height: 1px; background: var(--border); border: none; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}
