/* ══════════════════════════════════════════════════════════════
   ARTZ UI — camada compartilhada (site público)
   Carregada por index.html e por todas as páginas de servicos/.
   Contém: sistema de botões moderno + navegação mobile (drawer).
   Paleta: azul #007AFF · navy #0d1117 · WhatsApp #25D366.
   ══════════════════════════════════════════════════════════════ */

:root {
  --artz-blue: #007AFF;
  --artz-blue-dark: #0057b3;
  --artz-ink: #0d1117;
  --artz-wpp: #25D366;
}

/* ─── Base responsiva ─────────────────────────────────────────── */
img { max-width: 100%; }
section[id] { scroll-margin-top: 96px; }
/* impede scroll lateral causado por elementos animados (.reveal-right)
   e pelo drawer fechado fora da tela */
html, body { overflow-x: hidden; overflow-x: clip; }

/* ─── Botões ──────────────────────────────────────────────────── */
.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 44px;                 /* alvo de toque confortável */
  padding: .65rem 1.5rem;
  border-radius: 10px;
  font-family: 'Jost', sans-serif;
  font-weight: 600;
  letter-spacing: .01em;
  -webkit-tap-highlight-color: transparent;
  transition: transform .18s ease, box-shadow .18s ease,
              background .18s ease, color .18s ease, border-color .18s ease;
}
.btn:active { transform: translateY(0) scale(.97); }
.btn:focus-visible {
  outline: 3px solid rgba(0,122,255,.5);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(180deg, #1f8bff 0%, var(--artz-blue) 55%, #006ae0 100%);
  box-shadow: 0 1px 2px rgba(2,32,71,.25), 0 4px 14px rgba(0,122,255,.30);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #2f94ff 0%, #0d81ff 55%, #0070ea 100%);
  box-shadow: 0 2px 4px rgba(2,32,71,.25), 0 8px 24px rgba(0,122,255,.42);
  transform: translateY(-2px);
}

.btn-wpp {
  box-shadow: 0 1px 2px rgba(7,52,28,.22), 0 4px 14px rgba(37,211,102,.28);
}
.btn-wpp:hover {
  box-shadow: 0 2px 4px rgba(7,52,28,.22), 0 8px 22px rgba(37,211,102,.40);
  transform: translateY(-2px);
}

/* Brilho discreto que atravessa os CTAs sólidos no hover */
.btn-primary::after,
.btn-wpp::after {
  content: '';
  position: absolute;
  top: 0; left: -80%;
  width: 45%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
  opacity: 0;
}
.btn-primary:hover::after,
.btn-wpp:hover::after { animation: artz-sheen .7s ease forwards; }
@keyframes artz-sheen {
  from { left: -80%; opacity: 1; }
  to   { left: 130%; opacity: 1; }
}

/* Ripple (injetado pelo ui.js no toque/clique) */
.artz-opcao { position: relative; overflow: hidden; }
.artz-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  transform: scale(0);
  animation: artz-ripple .55s ease-out forwards;
  pointer-events: none;
  z-index: 0;
}
@keyframes artz-ripple {
  to { transform: scale(1); opacity: 0; }
}

/* ─── Navegação mobile (hambúrguer + drawer) ──────────────────── */
.artz-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  flex-shrink: 0;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 10px;
  cursor: pointer;
  color: #fff;
  transition: background .2s;
  -webkit-tap-highlight-color: transparent;
}
.artz-menu-btn:hover { background: rgba(255,255,255,.16); }
.artz-menu-btn:focus-visible { outline: 3px solid rgba(0,122,255,.5); outline-offset: 2px; }
.artz-menu-btn svg { width: 22px; height: 22px; }

.artz-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4,8,15,.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
  z-index: 10040;
}
.artz-overlay.aberto { opacity: 1; pointer-events: auto; }

.artz-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(330px, 88vw);
  background: rgba(10,14,22,.97);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border-left: 1px solid rgba(255,255,255,.08);
  z-index: 10050;
  transform: translateX(102%);
  visibility: hidden;
  transition: transform .35s cubic-bezier(.4,0,.2,1), visibility 0s .35s;
  display: flex;
  flex-direction: column;
  padding: 1.2rem 1.3rem 1.6rem;
  overflow-y: auto;
}
.artz-drawer.aberto {
  transform: none;
  visibility: visible;
  transition: transform .35s cubic-bezier(.4,0,.2,1), visibility 0s;
}

.artz-drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 .4rem .9rem;
  margin-bottom: .6rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.artz-drawer-top strong {
  color: rgba(255,255,255,.55);
  font-family: 'Jost', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.artz-drawer-fechar {
  width: 38px; height: 38px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.artz-drawer-fechar:hover { background: rgba(255,255,255,.15); color: #fff; }

.artz-drawer-links { display: flex; flex-direction: column; gap: .15rem; }
.artz-drawer-links a {
  display: block;
  padding: .8rem 1rem;
  border-radius: 10px;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-family: 'Jost', sans-serif;
  font-size: 1.02rem;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.artz-drawer-links a:hover,
.artz-drawer-links a:active { background: rgba(0,122,255,.14); color: #fff; }

.artz-drawer-ctas {
  margin-top: auto;
  padding-top: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.artz-drawer-ctas .btn { justify-content: center; width: 100%; }
/* garante contraste dos clones dentro do drawer escuro */
.artz-drawer-ctas .btn-outline { color: rgba(255,255,255,.85); border-color: rgba(255,255,255,.35); }
.artz-drawer-ctas .btn-ghost   { color: rgba(255,255,255,.75); border: 1px solid rgba(255,255,255,.25); }

body.artz-menu-aberto { overflow: hidden; }

/* ─── Breakpoints ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  header nav { display: none !important; }
  .artz-menu-btn { display: inline-flex; }
  header .btn-cliente { display: none; }  /* index: migra para o drawer */
  header .btn-ghost   { display: none; }  /* serviços: "Voltar" migra para o drawer */

  /* WhatsApp do header vira ícone circular: font-size 0 esconde o texto
     (nó de texto solto no <a>), sobra só o logo. No drawer o clone mantém
     o texto porque lá o botão não está dentro do <header>. */
  header .btn-wpp {
    font-size: 0;
    gap: 0;
    width: 46px;
    min-height: 46px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    flex-shrink: 0;
  }
  header .btn-wpp svg { width: 22px; height: 22px; }
}

@media (max-width: 560px) {
  header { gap: .6rem; }
}

/* ─── Acessibilidade: movimento reduzido ──────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .btn, .artz-drawer, .artz-overlay { transition: none; }
  .btn-primary:hover::after, .btn-wpp:hover::after { animation: none; }
  .btn-primary:hover, .btn-wpp:hover { transform: none; }
}
