/* =========================================================
   CodexAI — Landing Page
   Mobile first · Tema escuro · Gradiente azul/roxo
   ========================================================= */

:root {
  /* Cores */
  --bg: #05050a;
  --bg-elev: #0c0c16;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --text: #ffffff;
  --text-muted: #b4b6c8;   /* contraste ~9:1 sobre o fundo */
  --blue: #3b82f6;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --error: #ff6b81;
  --success: #4ade80;
  --whatsapp: #25d366;

  --gradient: linear-gradient(135deg, #2563eb 0%, #6d28d9 55%, #9333ea 100%);
  --gradient-text: linear-gradient(120deg, #60a5fa 0%, #a78bfa 50%, #c084fc 100%);

  /* Tipografia */
  --font-title: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Forma */
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 12px 40px -12px rgba(124, 58, 237, 0.55);

  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  /* preto "brilhante": brilhos sutis em azul/roxo */
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(139, 92, 246, 0.16), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(59, 130, 246, 0.12), transparent 60%),
    radial-gradient(800px 500px at 50% 110%, rgba(147, 51, 234, 0.10), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 1000;
  background: var(--gradient); color: #fff; padding: 10px 16px;
  border-radius: var(--radius-sm); font-weight: 600;
  transition: top .2s;
}
.skip-link:focus { top: 16px; }

.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 16px; }

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

h1, h2, h3 { font-family: var(--font-title); line-height: 1.15; letter-spacing: -0.02em; }

/* ---------- Botões ---------- */
.btn {
  --btn-y: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-weight: 600; font-size: 0.95rem;
  cursor: pointer;
  position: relative; overflow: hidden; isolation: isolate;
  transform: translateY(var(--btn-y)) scale(1);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s, border-color .25s;
  -webkit-tap-highlight-color: transparent;
}
.btn i { transition: transform .25s var(--ease); }
.btn:hover { --btn-y: -2px; }
.btn:active { transform: translateY(0) scale(0.96); transition-duration: .08s; }

.btn--primary {
  background: var(--gradient);
  background-size: 200% 200%;
  background-position: 0% 50%;
  color: #fff;
  box-shadow: var(--shadow-glow);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-position .6s var(--ease);
}
.btn--primary:hover {
  background-position: 100% 50%;
  box-shadow: 0 18px 46px -12px rgba(124, 58, 237, 0.75);
}
/* brilho que atravessa o botão no hover */
.btn--primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease);
}
.btn--primary:hover::after { transform: translateX(120%); }

.btn--ghost {
  background: var(--surface);
  border-color: var(--border);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { background: var(--surface-hover); border-color: rgba(167, 139, 250, .45); }
.btn--ghost:hover i { transform: translateX(4px); }

.btn--sm { padding: 9px 18px; font-size: .9rem; }
.btn--lg { padding: 15px 28px; font-size: 1rem; }
.btn--block { width: 100%; }

/* efeito "ripple" de clique (criado via JS) */
.ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: rgba(255, 255, 255, .35);
  transform: scale(0); animation: ripple .6s ease-out forwards;
}
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  height: var(--header-h);
  transition: background-color .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  background: rgba(5, 5, 10, .75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: var(--border);
}
.nav { height: 100%; display: flex; align-items: center; justify-content: space-between; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-title); font-weight: 800; font-size: 1.3rem; }
.logo__img {
  width: 44px; height: 44px; border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(139, 92, 246, .35);
  box-shadow: 0 0 18px -4px rgba(124, 58, 237, .7);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.logo:hover .logo__img {
  transform: rotate(-8deg) scale(1.06);
  box-shadow: 0 0 26px -2px rgba(124, 58, 237, .9);
}

.nav__toggle {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; font-size: 1.1rem;
  display: grid; place-items: center;
  transition: background-color .2s, transform .15s;
}
.nav__toggle:active { transform: scale(.94); }

.nav__menu {
  position: fixed; top: var(--header-h); left: 16px; right: 16px;
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px;
  background: rgba(12, 12, 22, .97);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity .25s, transform .25s var(--ease), visibility .25s;
}
.nav__menu.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.nav__link {
  display: block; padding: 12px 14px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-weight: 500;
  transition: color .2s, background-color .2s;
}
.nav__link:hover, .nav__link.is-active { color: #fff; background: var(--surface-hover); }
.nav__menu .btn { margin-top: 6px; width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 48px) 0 72px;
  overflow: hidden;
}
.hero__glow {
  position: absolute; width: 520px; height: 520px; right: -160px; top: 40px;
  background: radial-gradient(circle, rgba(124, 58, 237, .35), transparent 65%);
  filter: blur(40px); pointer-events: none;
}
.hero__grid { position: relative; display: grid; gap: 48px; align-items: center; }

.badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--border);
  font-size: .85rem; color: var(--text-muted);
}
.badge__dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 0 0 rgba(74, 222, 128, .6);
  animation: dot 2s infinite;
}
@keyframes dot { 70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }

.hero__title { font-size: clamp(2.2rem, 7vw, 4rem); font-weight: 800; margin: 20px 0 18px; }
.hero__text { color: var(--text-muted); font-size: 1.05rem; max-width: 560px; }
.hero__actions { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; }

.hero__stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: 40px; max-width: 520px;
}
.hero__stats li {
  padding: 14px 12px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  text-align: center;
}
.hero__stats strong { display: block; font-family: var(--font-title); font-size: 1.3rem; }
.hero__stats span { font-size: .78rem; color: var(--text-muted); }

.hero__visual { position: relative; display: flex; justify-content: center; }
.hero__parallax { will-change: transform; width: 100%; max-width: 560px; }
.hero__parallax img {
  width: 100%; height: auto;
  border-radius: var(--radius-lg);
  filter: drop-shadow(0 30px 60px rgba(76, 29, 149, .45));
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-14px); } }

/* ---------- Seções ---------- */
.section { padding: 80px 0; position: relative; }
.section__head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: #a5b4fc; margin-bottom: 14px;
}
.section__title { font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 700; margin-bottom: 16px; }
.section__lead { color: var(--text-muted); }

/* Sobre */
.about__grid { display: grid; gap: 40px; }
.about__text p { color: var(--text-muted); margin-bottom: 16px; }
.about__text strong { color: #fff; font-weight: 600; }

.features { display: grid; gap: 16px; }
.feature {
  display: flex; gap: 16px; padding: 22px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform .35s var(--ease), border-color .35s, background-color .35s;
}
.feature:hover { transform: translateY(-4px); border-color: rgba(139, 92, 246, .4); background: var(--surface-hover); }
.feature__icon {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center; font-size: 1.15rem;
  background: var(--gradient); box-shadow: var(--shadow-glow);
}
.feature h3 { font-size: 1.05rem; margin-bottom: 6px; }
.feature p { color: var(--text-muted); font-size: .93rem; }

/* Cards de serviços */
.cards { display: grid; gap: 24px; }
.card {
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-elev); border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .45s;
}
.card:hover {
  transform: translateY(-8px);
  border-color: rgba(139, 92, 246, .45);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(139, 92, 246, .15), var(--shadow-glow);
}
.card__media { height: 180px; overflow: hidden; position: relative; }
.card__img {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 3.4rem; color: rgba(255, 255, 255, .92);
  transition: transform .7s var(--ease);
}
.card__img::before {
  /* grade tecnológica sobre a "imagem" */
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at center, #000 30%, transparent 75%);
}
.card__img i { position: relative; filter: drop-shadow(0 10px 25px rgba(0,0,0,.4)); }
.card:hover .card__img { transform: scale(1.1); }

.card__media--blue   .card__img { background: radial-gradient(circle at 30% 20%, #3b82f6, #1e3a8a 55%, #0b1026); }
.card__media--violet .card__img { background: radial-gradient(circle at 70% 20%, #a78bfa, #5b21b6 55%, #140b2e); }
.card__media--mix    .card__img { background: linear-gradient(135deg, #2563eb, #7c3aed 60%, #c026d3); }
.card__media--cyan   .card__img { background: radial-gradient(circle at 40% 30%, #22d3ee, #2563eb 50%, #1e1b4b); }

.card__body { padding: 24px; }
.card__body h3 { font-size: 1.2rem; margin-bottom: 10px; }
.card__body p { color: var(--text-muted); font-size: .95rem; }
.card__list { margin-top: 16px; display: grid; gap: 8px; font-size: .9rem; color: #d6d8e6; }
.card__list i { color: #a78bfa; margin-right: 8px; font-size: .8rem; }

/* Processo */
.steps { display: grid; gap: 20px; counter-reset: step; }
.step {
  position: relative; padding: 28px 24px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform .35s var(--ease), border-color .35s;
}
.step:hover { transform: translateY(-4px); border-color: rgba(59, 130, 246, .45); }
.step__num {
  font-family: var(--font-title); font-weight: 800; font-size: 2.2rem;
  background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  display: block; margin-bottom: 10px;
}
.step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: .93rem; }

.cta {
  margin-top: 56px; padding: 36px 24px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(600px 200px at 0% 0%, rgba(59,130,246,.25), transparent 70%),
    radial-gradient(600px 200px at 100% 100%, rgba(147,51,234,.3), transparent 70%),
    var(--bg-elev);
  border: 1px solid rgba(139, 92, 246, .3);
  box-shadow: var(--shadow-glow);
  display: flex; flex-direction: column; gap: 24px; text-align: center; align-items: center;
}
.cta__title { font-size: clamp(1.35rem, 4vw, 1.9rem); margin-bottom: 8px; }
.cta p { color: var(--text-muted); }

/* Contato / formulário */
.contact__grid { display: grid; gap: 40px; align-items: start; }
.contact__info > p { color: var(--text-muted); }
.contact__list { margin-top: 28px; display: grid; gap: 14px; color: #d6d8e6; }
.contact__list i { width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--surface); border: 1px solid var(--border); margin-right: 10px; color: #a78bfa; }
.link { color: #a5b4fc; text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: #fff; }

.form {
  padding: 28px 20px;
  border-radius: var(--radius-lg);
  background: rgba(12, 12, 22, .8);
  border: 1px solid var(--border);
  box-shadow: var(--shadow), 0 0 80px -40px rgba(124, 58, 237, .5);
  display: grid; gap: 18px;
}
.form__hint { font-size: .85rem; color: var(--text-muted); }
.req { color: #c4b5fd; }
.optional { color: var(--text-muted); font-weight: 400; font-size: .85rem; }
.field-row { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 500; font-size: .92rem; }
.field input, .field textarea {
  width: 100%; padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .14);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
  resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: #80839a; }
.field input:hover, .field textarea:hover { border-color: rgba(255, 255, 255, .25); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, .06);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .2);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(255, 107, 129, .15);
}
.field__error { font-size: .82rem; color: var(--error); min-height: 1em; }
.field__error:empty { display: none; }
.form__status { font-size: .9rem; text-align: center; min-height: 1.2em; }
.form__status.is-success { color: var(--success); }
.form__status.is-error { color: var(--error); }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 32px 0; margin-top: 40px; }
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.footer__copy { color: var(--text-muted); font-size: .88rem; }
.footer__top {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .25s var(--ease), background-color .25s;
}
.footer__top:hover { transform: translateY(-3px); background: var(--surface-hover); }

/* ---------- WhatsApp flutuante ---------- */
.whatsapp-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 200;
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--whatsapp); color: #fff; font-size: 1.9rem;
  box-shadow: 0 10px 30px -6px rgba(37, 211, 102, .55);
  transition: transform .25s var(--ease);
}
.whatsapp-float::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--whatsapp);
  animation: pulse 2.2s ease-out infinite;
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float:active { transform: scale(.95); }
@keyframes pulse {
  0% { transform: scale(1); opacity: .8; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ---------- Animações de entrada (scroll reveal) ---------- */
/* Só esconde os elementos se o JS estiver ativo (classe .js no <html>) */
.js .reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--delay, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================
   Breakpoints (mobile first)
   ========================================================= */
@media (min-width: 560px) {
  .hero__actions { flex-direction: row; flex-wrap: wrap; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .form { padding: 36px 32px; }
}

/* Tablet */
@media (min-width: 768px) {
  .container { padding-inline: 24px; }
  .section { padding: 104px 0; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .cta { flex-direction: row; justify-content: space-between; text-align: left; padding: 44px 48px; }
  .footer__inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* Desktop */
@media (min-width: 1024px) {
  .nav__toggle { display: none; }
  .nav__menu {
    position: static; flex-direction: row; align-items: center; gap: 4px;
    padding: 0; background: none; border: 0; box-shadow: none;
    opacity: 1; visibility: visible; transform: none;
  }
  .nav__link { padding: 8px 14px; }
  .nav__menu .btn { margin: 0 0 0 10px; width: auto; }

  .hero { padding: calc(var(--header-h) + 72px) 0 112px; min-height: 100vh; display: flex; align-items: center; }
  .hero__grid { grid-template-columns: 1.1fr 1fr; }

  .about__grid { grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
  .features { grid-template-columns: 1fr 1fr; }

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

  .contact__grid { grid-template-columns: 1fr 1.2fr; gap: 64px; }
}

/* =========================================================
   Acessibilidade: usuários que preferem menos movimento
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .hero__parallax { transform: none !important; }
  .whatsapp-float::before { display: none; }
  .card:hover, .feature:hover, .step:hover, .btn:hover { transform: none; }
  .card:hover .card__img { transform: none; }
}
