/* =========================================================
   ESTÚDIO — estilos compartilhados por todas as páginas
   ========================================================= */

:root { color-scheme: dark; }

html { -webkit-text-size-adjust: 100%; }

body {
  background-color: #030712;
  color: #f8fafc;
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* Âncoras não ficam escondidas atrás do header fixo */
section[id], article[id], h2[id] { scroll-margin-top: 6rem; }

/* ---------- Fundo / iluminação cinematográfica ---------- */
.bg-grid {
  background-size: 50px 50px;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
}

/* ---------- Tilt 3D ---------- */
.tilt-wrapper { perspective: 1000px; transform-style: preserve-3d; }
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.4, 1), box-shadow 0.25s ease;
  will-change: transform;
}
.tilt-card.tilt-resetting { transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1); }
.tilt-depth-lg { transform: translateZ(48px); }
.tilt-depth-md { transform: translateZ(28px); }
.tilt-depth-sm { transform: translateZ(14px); }

.glare-overlay {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle 320px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.14), transparent 80%);
  opacity: 0;
  transition: opacity 0.3s ease;
  mix-blend-mode: overlay;
  z-index: 20;
}
.tilt-wrapper:hover .glare-overlay { opacity: 1; }

/* Camadas decorativas (em profundidade 3D) nunca capturam o clique: no 3D, quem está mais
   perto da tela ganha o clique e cobria o link do card. */
.tilt-card .tilt-depth-sm,
.tilt-card .tilt-depth-md,
.tilt-card .play-hover { pointer-events: none; }
/* o card do hero é um botão real: seus filhos decorativos também não bloqueiam */
.tilt-card .tilt-depth-lg { pointer-events: none; }

.border-gradient { border: 1px solid rgba(255, 255, 255, 0.08); background-clip: padding-box; }
.border-gradient:hover { border-color: rgba(96, 165, 250, 0.35); }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: #030712; }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #2563eb; }

/* ---------- Acessibilidade ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 0.75rem 1.25rem; border-radius: 0.75rem;
  background: #2563eb; color: #fff; font-weight: 600; font-size: 0.875rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 3px;
}
.vx-input:focus-visible { outline: none; }

/* ---------- Mobile ---------- */
/* Alvos de toque confortáveis (mín. 44px) */
.filter-btn { min-height: 44px; }
.icon-btn { width: 44px; height: 44px; border-radius: 9999px; } /* display vem das classes do Tailwind */

@media (max-width: 767px) {
  /* Blur gigante pesa em celulares: simplifica o fundo */
  .ambient-orb { display: none; }
  .ambient-spot { width: 140vw !important; height: 360px !important; filter: blur(80px); }
  .site-footer { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
}

/* Cards de portfólio: em telas de toque não existe hover — mostra um indicador de play fixo */
@media (hover: none) {
  .project-card .play-hover { opacity: 1; background: transparent; backdrop-filter: none; align-items: flex-end; justify-content: flex-start; padding: 0.75rem; }
  .project-card .play-hover span { width: 2.25rem; height: 2.25rem; }
}

/* ---------- Menu mobile ---------- */
.mobile-menu { display: none; }
.mobile-menu.is-open { display: block; }
@media (min-width: 768px) { .mobile-menu, .mobile-menu.is-open { display: none; } }

/* ---------- CTA fixo no celular ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(3, 7, 18, 0.9);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateY(110%); visibility: hidden;
  transition: transform 0.3s ease, visibility 0s linear 0.3s;
}
.sticky-cta.is-visible { transform: none; visibility: visible; transition: transform 0.3s ease, visibility 0s; }
body.cookie-open .sticky-cta { transform: translateY(110%); visibility: hidden; }
@media (min-width: 768px) { .sticky-cta { display: none; } }

/* ---------- Formulário ---------- */
.vx-label { display: block; margin-bottom: 0.4rem; text-align: left; font-size: 0.8125rem; font-weight: 600; color: #cbd5e1; }
.vx-label .opt { font-weight: 400; color: #64748b; }
.vx-input {
  width: 100%; min-height: 48px; padding: 0.75rem 1rem;
  border-radius: 0.875rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  font: inherit; font-size: 16px; /* 16px evita o zoom automático do iOS */
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.vx-input::placeholder { color: #64748b; }
.vx-input:hover { border-color: rgba(255, 255, 255, 0.22); }
.vx-input:focus { outline: none; border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25); background: rgba(255, 255, 255, 0.06); }
.vx-input.is-invalid { border-color: #f87171; box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15); }
select.vx-input { appearance: none; -webkit-appearance: none; padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.9rem center; }
select.vx-input option { background: #0b1426; color: #f8fafc; }
textarea.vx-input { min-height: 130px; resize: vertical; line-height: 1.5; }
.vx-error { min-height: 1.15rem; margin-top: 0.3rem; text-align: left; font-size: 0.75rem; line-height: 1.3; color: #fca5a5; }
.vx-check { display: flex; align-items: flex-start; gap: 0.75rem; text-align: left; font-size: 0.8125rem; color: #94a3b8; line-height: 1.45; }
.vx-check input { flex: none; width: 22px; height: 22px; margin-top: 1px; accent-color: #2563eb; }
.vx-check a { color: #93c5fd; text-decoration: underline; text-underline-offset: 2px; }
.vx-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.vx-status { margin-top: 1rem; padding: 0.85rem 1rem; border-radius: 0.875rem; font-size: 0.875rem; text-align: left; display: none; }
.vx-status.is-visible { display: block; }
.vx-status.ok { background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.35); color: #bbf7d0; }
.vx-status.err { background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.35); color: #fecaca; }
.vx-status.info { background: rgba(96, 165, 250, 0.1); border: 1px solid rgba(96, 165, 250, 0.35); color: #bfdbfe; }
.vx-status a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Aviso de cookies ---------- */
.cookie-banner {
  position: fixed; z-index: 60;
  left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  max-width: 760px; margin: 0 auto; padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
  border-radius: 18px;
  background: rgba(8, 14, 29, 0.97);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(37, 99, 235, 0.12);
  animation: cookie-in 0.35s ease both;
}
.cookie-banner p { font-size: 0.8125rem; line-height: 1.5; color: #cbd5e1; margin: 0; }
.cookie-banner a { color: #93c5fd; text-decoration: underline; text-underline-offset: 2px; }
.cookie-actions { display: flex; gap: 10px; flex: none; }
.cookie-btn {
  flex: 1; min-height: 46px; padding: 0 1.25rem; border-radius: 9999px;
  font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.06); color: #f8fafc;
  transition: background 0.2s, border-color 0.2s;
}
.cookie-btn:hover { background: rgba(255, 255, 255, 0.12); }
.cookie-btn.primary { background: #2563eb; border-color: #2563eb; }
.cookie-btn.primary:hover { background: #1d4ed8; }
@media (min-width: 640px) {
  .cookie-banner { flex-direction: row; align-items: center; gap: 20px; }
  .cookie-btn { flex: none; }
}
@keyframes cookie-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Páginas legais ---------- */
.legal { color: #cbd5e1; font-size: 1rem; line-height: 1.75; }
.legal h2 { margin: 2.5rem 0 0.75rem; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 1.375rem; line-height: 1.3; color: #fff; }
.legal h3 { margin: 1.5rem 0 0.5rem; font-weight: 700; font-size: 1.0625rem; color: #e2e8f0; }
.legal p { margin: 0 0 1rem; }
.legal ul { margin: 0 0 1.25rem; padding-left: 1.25rem; list-style: disc; }
.legal li { margin: 0.35rem 0; }
.legal a { color: #93c5fd; text-decoration: underline; text-underline-offset: 3px; }
.legal a:hover { color: #bfdbfe; }
.legal strong { color: #f1f5f9; }
.legal .ph { background: rgba(250, 204, 21, 0.14); color: #fde68a; border-radius: 0.25rem; padding: 0 0.3rem; font-weight: 600; }
.legal-toc { margin: 1.5rem 0 0; padding: 1.1rem 1.25rem; border-radius: 1rem; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); font-size: 0.9rem; }
.legal-toc ol { margin: 0.5rem 0 0; padding-left: 1.25rem; list-style: decimal; columns: 1; }
.legal-toc li { margin: 0.25rem 0; }
@media (min-width: 640px) { .legal-toc ol { columns: 2; column-gap: 2rem; } }

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .animate-marquee { animation: none !important; }
}
