* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* overflow-x no html é obrigatório: no mobile o scroll container
   é o html, não o body. Apenas no body é insuficiente —
   o browser delega o overflow para o viewport e ignora o body. */
html {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  background: #f5f3ef;
  color: #1a1a1a;
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  max-width: 100%;
}

/* ===== TRANSITION DE ENTRADA ===== */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #1a1a1a;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.8s cubic-bezier(0.77, 0, 0.18, 1);
  transform: translateY(0);
}

.page-transition.hide {
  transform: translateY(-100%);
}

.transition-content {
  text-align: center;
  animation: fadeInScale 0.6s ease-out;
}

.transition-content .logo-icon {
  font-size: 4rem;
  color: #f5f3ef;
  margin-bottom: 1rem;
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.transition-content h3 {
  font-family: 'Playfair Display', serif;
  color: #f5f3ef;
  letter-spacing: 4px;
  font-size: 1.5rem;
}

.transition-content .ink-drop {
  width: 2px;
  height: 60px;
  background: #f5f3ef;
  margin: 1.5rem auto;
  animation: dropLine 1.2s ease-in-out infinite;
}

@keyframes dropLine {
  0%, 100% { transform: scaleY(0.3); opacity: 0.3; }
  50% { transform: scaleY(1); opacity: 1; }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* ===== EFEITOS DE TINTA CONTÍNUOS ===== */
.ink-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ink-blob {
  position: absolute;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0) 70%);
  border-radius: 60% 40% 50% 50% / 45% 50% 50% 55%;
  filter: blur(25px);
  animation: blobFloat 20s ease-in-out infinite;
}

.ink-blob:nth-child(1) { width: 500px; height: 500px; top: -150px; left: -150px; background: radial-gradient(ellipse, rgba(0,0,0,0.12), transparent); }
.ink-blob:nth-child(2) { width: 600px; height: 600px; bottom: -200px; right: -200px; animation-duration: 25s; background: radial-gradient(ellipse, rgba(30,30,30,0.1), transparent); }
.ink-blob:nth-child(3) { width: 350px; height: 350px; top: 40%; left: 70%; animation-duration: 18s; }
.ink-blob:nth-child(4) { width: 280px; height: 280px; bottom: 30%; left: 10%; animation-duration: 22s; }

@keyframes blobFloat {
  0%, 100% { border-radius: 60% 40% 50% 50% / 45% 50% 50% 55%; transform: translate(0,0) rotate(0deg); }
  33% { border-radius: 45% 55% 40% 60% / 50% 45% 55% 50%; transform: translate(40px,-30px) rotate(6deg); }
  66% { border-radius: 50% 45% 55% 40% / 40% 55% 45% 60%; transform: translate(-30px,25px) rotate(-5deg); }
}

.ink-splash {
  position: absolute;
  background: #1a1a1a;
  border-radius: 50%;
  opacity: 0;
  animation: splashAnim 3s ease-out infinite;
}
@keyframes splashAnim {
  0% { transform: scale(0); opacity: 0.4; }
  50% { opacity: 0.2; }
  100% { transform: scale(3); opacity: 0; }
}
.ink-splash:nth-child(5) { width: 60px; height: 60px; top: 20%; left: 15%; animation-delay: 0s; }
.ink-splash:nth-child(6) { width: 40px; height: 40px; bottom: 25%; right: 20%; animation-delay: 1.2s; }
.ink-splash:nth-child(7) { width: 80px; height: 80px; top: 60%; left: 85%; animation-delay: 0.7s; }
.ink-splash:nth-child(8) { width: 30px; height: 30px; top: 75%; left: 30%; animation-delay: 2s; }
.ink-splash:nth-child(9) { width: 50px; height: 50px; bottom: 10%; left: 60%; animation-delay: 1.5s; }

.ink-drip {
  position: absolute;
  width: 3px;
  height: 20px;
  background: #1a1a1a;
  border-radius: 2px;
  opacity: 0.3;
  animation: dripFall 2.8s linear infinite;
}
@keyframes dripFall {
  0% { transform: translateY(-100px); opacity: 0.4; }
  80% { opacity: 0.2; }
  100% { transform: translateY(100vh); opacity: 0; }
}
.ink-drip:nth-child(10) { left: 25%; animation-delay: 0s; width: 2px; height: 15px; }
.ink-drip:nth-child(11) { left: 45%; animation-delay: 1s; width: 3px; height: 25px; }
.ink-drip:nth-child(12) { left: 65%; animation-delay: 0.5s; width: 2px; height: 18px; }
.ink-drip:nth-child(13) { left: 85%; animation-delay: 1.8s; width: 4px; height: 22px; }
.ink-drip:nth-child(14) { left: 15%; animation-delay: 2.2s; width: 2px; height: 16px; }

.ink-stroke {
  position: absolute;
  background: rgba(0,0,0,0.05);
  filter: blur(8px);
  animation: strokeMove 12s ease-in-out infinite;
}
@keyframes strokeMove {
  0%, 100% { transform: translateX(-50px) rotate(0deg); opacity: 0.3; }
  50% { transform: translateX(50px) rotate(5deg); opacity: 0.6; }
}
.ink-stroke:nth-child(15) { width: 300px; height: 40px; top: 30%; left: -100px; background: linear-gradient(90deg, transparent, #1a1a1a, transparent); }
.ink-stroke:nth-child(16) { width: 400px; height: 30px; bottom: 40%; right: -150px; background: linear-gradient(270deg, transparent, #1a1a1a, transparent); animation-duration: 15s; }

.paper-texture {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.content {
  position: relative;
  z-index: 10;
  background: transparent;
}

/* === NAVEGAÇÃO === */
.navbar {
  background: rgba(245, 243, 239, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 1rem 0;
  transition: all 0.3s ease;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}
.navbar.scrolled {
  padding: 0.6rem 0;
  background: rgba(245, 243, 239, 0.98);
}
.navbar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #1a1a1a !important;
}
.nav-link {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #1a1a1a !important;
  margin: 0 1rem;
  transition: opacity 0.2s;
}
.nav-link:hover { opacity: 0.6; }

/* === HERO === */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  margin-top: 0;
  padding-top: 80px;
}
.hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}
.hero-badge {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  background: rgba(0,0,0,0.05);
  padding: 0.4rem 1rem;
  margin-bottom: 1.5rem;
  border-radius: 30px;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 5rem;
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 1rem;
  color: #1a1a1a;
}
.hero .subtitle {
  font-size: 1rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #555;
  margin-bottom: 2rem;
}

/* === BOTÕES === */
.btn-ink {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  padding: 12px 32px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}
.btn-ink::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}
.btn-ink:hover::after { left: 100%; }
.btn-ink:hover { background: #333; transform: translateY(-2px); color: #fff; }
.btn-outline {
  background: transparent;
  border: 1px solid #1a1a1a;
  color: #1a1a1a;
}
.btn-outline:hover { background: #1a1a1a; color: #fff; }

/* === SEÇÕES === */
section { padding: 100px 0; position: relative; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-tag { font-size: 0.7rem; letter-spacing: 3px; text-transform: uppercase; color: #888; margin-bottom: 1rem; display: inline-block; }
.section-title { font-family: 'Playfair Display', serif; font-size: 2.8rem; font-weight: 600; letter-spacing: -1px; margin-bottom: 1rem; color: #1a1a1a; }
.ink-divider { width: 60px; height: 2px; background: #1a1a1a; margin: 1.5rem auto; opacity: 0.3; }

/* === CARDS - Tamanhos uniformes === */
.row-cards {
  display: flex;
  flex-wrap: wrap;
}
.card-ink {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(0,0,0,0.05);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.4s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}
.card-ink::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0,0,0,0.03) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s;
}
.card-ink:hover::before { opacity: 1; }
.card-ink:hover { transform: translateY(-8px); box-shadow: 0 20px 30px -15px rgba(0,0,0,0.1); }
.card-ink.selected {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}
.card-ink.selected .price, .card-ink.selected .brush-icon { color: #fff; }
.brush-icon { font-size: 2.2rem; color: #1a1a1a; margin-bottom: 1rem; display: inline-block; }
.card-ink h5 { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.75rem; }
.card-ink p { font-size: 0.85rem; line-height: 1.4; margin-bottom: 0; flex-grow: 0; }
.card-ink .price { font-size: 1.8rem; font-weight: 700; margin: 0.5rem 0; }

/* === FORMULÁRIO DE RESERVA === */
.booking-card {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0,0,0,0.05);
  padding: 2.5rem;
}
.form-control {
  background: #fff;
  border: 1px solid #ddd;
  padding: 12px 16px;
  border-radius: 0;
}
.form-control:focus { border-color: #1a1a1a; box-shadow: none; }
.form-label { font-size: 0.7rem; letter-spacing: 1px; text-transform: uppercase; color: #666; margin-bottom: 0.5rem; }

.opcao-btn {
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(0,0,0,0.1);
  color: #1a1a1a;
  padding: 20px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  font-size: 0.9rem;
}
.opcao-btn:hover { background: #f0f0f0; transform: translateY(-3px); }
.opcao-btn.selected { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.opcao-btn strong { font-size: 1.3rem; display: block; margin: 10px 0; }
.opcao-btn .valor { font-size: 1.1rem; font-weight: bold; }

.horarios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 15px;
}
.horario-btn {
  background: #fff;
  border: 1px solid #ddd;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
}
.horario-btn:hover { background: #f0f0f0; border-color: #1a1a1a; }
.horario-btn.selected { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.horario-btn.disabled { background: #f5f5f5; color: #bbb; cursor: not-allowed; text-decoration: line-through; }

.status-card {
  background: rgba(0,0,0,0.03);
  padding: 0.8rem 1rem;
  margin-top: 1.5rem;
  font-size: 0.8rem;
  border-left: 3px solid #1a1a1a;
}
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #ccc;
  border-top-color: #1a1a1a;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === GALERIA === */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.gallery-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay i { color: #fff; font-size: 2rem; }
.gallery-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  z-index: 2000;
  cursor: pointer;
}
.gallery-modal.active { display: flex; align-items: center; justify-content: center; }
.gallery-modal img { max-width: 90%; max-height: 90%; }
.close-modal { position: absolute; top: 20px; right: 30px; color: #fff; font-size: 2rem; cursor: pointer; }

/* Footer */
.footer {
  background: #1a1a1a;
  color: #ccc;
  padding: 3rem 0 2rem;
  position: relative;
  z-index: 10;
}
.footer a { color: #ccc; text-decoration: none; margin: 0 1rem; font-size: 0.8rem; }
.footer a:hover { color: #fff; }

/* REDES SOCIAIS - ESTILO NANQUIM */
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid #1a1a1a;
  color: #1a1a1a;
  margin: 0 6px;
  transition: all 0.25s ease;
  text-decoration: none;
  font-size: 1.1rem;
}
.social-icon:hover {
  background: #1a1a1a;
  color: #f5f3ef;
  border-color: #1a1a1a;
  transform: translateY(-3px);
}

/* MAPA ESTILO TINTA NANQUIM */
.map-container {
  width: 100%;
  height: 400px;
  overflow: hidden;
  border-radius: 10px;
  background: #1a1a1a;
}
.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: invert(90%) hue-rotate(180deg) contrast(90%);
}

/* Instagram Float - mesmo estilo do WhatsApp, mas com cores do Instagram */
.instagram-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  color: #fff;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 9999;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.instagram-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  color: #fff;
}

/* Animações customizadas para AOS */
[data-aos="fade-up-ink"] {
  opacity: 0;
  transform: translateY(40px);
  transition-property: transform, opacity;
}
[data-aos="fade-up-ink"].aos-animate {
  opacity: 1;
  transform: translateY(0);
}
[data-aos="zoom-ink"] {
  opacity: 0;
  transform: scale(0.95);
  transition-property: transform, opacity;
}
[data-aos="zoom-ink"].aos-animate {
  opacity: 1;
  transform: scale(1);
}
[data-aos="slide-right-ink"] {
  opacity: 0;
  transform: translateX(-40px);
  transition-property: transform, opacity;
}
[data-aos="slide-right-ink"].aos-animate {
  opacity: 1;
  transform: translateX(0);
}
[data-aos="slide-left-ink"] {
  opacity: 0;
  transform: translateX(40px);
  transition-property: transform, opacity;
}
[data-aos="slide-left-ink"].aos-animate {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2.8rem; }
  .section-title { font-size: 2rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .booking-card { padding: 1.5rem; }
  section { padding: 60px 0; }
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    font-size: 24px;
  }
}
@media (max-width: 480px) { .gallery-grid { grid-template-columns: 1fr; } }

/* =====================================================
   OTIMIZAÇÕES DE PERFORMANCE PARA DISPOSITIVOS MÓVEIS
   Desktop não é afetado por nenhuma dessas regras.
   ===================================================== */
@media (max-width: 768px) {

  /* --- 0. Garante contenção total de largura no mobile ---
     Mesmo com html/body tendo overflow-x:hidden, alguns browsers
     ainda permitem que filhos de position:fixed extrapolem.
     Forçamos o content principal a nunca ultrapassar 100vw,
     e o footer a sempre preencher toda a largura disponível. --- */
  .content {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }
  .footer {
    width: 100%;
    max-width: 100vw;
    position: relative;
  }

  /* --- 1. Desativa os efeitos de tinta animados ---
     São os maiores culpados pelo travamento: 16 elementos
     com filter:blur, border-radius e transform animados
     simultaneamente forçam repintura constante da GPU. --- */
  .ink-canvas,
  .paper-texture {
    display: none !important;
  }

  /* --- 2. Remove backdrop-filter ---
     blur() de backdrop exige uma camada de compositing
     separada — extremamente custoso em mobile. --- */
  .navbar {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(245, 243, 239, 0.97) !important;
  }
  .navbar.scrolled {
    background: #f5f3ef !important;
  }
  .card-ink {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(255, 255, 255, 0.95) !important;
  }
  .booking-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(255, 255, 255, 0.97) !important;
  }

  /* --- 3. Interrompe todas as animações CSS nos ink-blobs,
     splashes, drips e strokes caso display:none não seja
     suficiente por algum motivo de specificity. --- */
  .ink-blob,
  .ink-splash,
  .ink-drip,
  .ink-stroke {
    animation: none !important;
    display: none !important;
  }

  /* --- 4. Simplifica animações de entrada (AOS custom) ---
     Reduz a distância de translate para evitar janking
     durante o scroll em telas menores. --- */
  [data-aos="fade-up-ink"] {
    transform: translateY(20px);
  }
  [data-aos="slide-right-ink"] {
    transform: translateX(-20px);
  }
  [data-aos="slide-left-ink"] {
    transform: translateX(20px);
  }

  /* --- 5. Remove hover transforms em cards ---
     :hover com transform causa layout thrashing no mobile
     (acontece acidentalmente ao rolar a tela). --- */
  .card-ink:hover {
    transform: none !important;
    box-shadow: none !important;
  }
  .card-ink:hover::before {
    opacity: 0 !important;
  }
  .btn-ink:hover {
    transform: none !important;
  }
  .opcao-btn:hover {
    transform: none !important;
  }
  .social-icon:hover {
    transform: none !important;
  }

  /* --- 6. Simplifica a transição de entrada da página ---
     Reduz de 0.8s para 0.4s e usa opacity em vez de
     transform para menor custo de compositing. --- */
  .page-transition {
    transition: opacity 0.4s ease !important;
    transform: none !important;
  }
  .page-transition.hide {
    opacity: 0 !important;
    transform: none !important;
  }

  /* --- 7. Otimiza a galeria de imagens no scroll ---
     Desativa o zoom de hover (desnecessário em touch). --- */
  .gallery-item img {
    transition: none !important;
  }
  .gallery-item:hover img {
    transform: none !important;
  }

  /* --- 9. Corrige o footer mobile ---
     Os links em linha com margin: 0 1rem transbordam em telas
     pequenas e descentralizam o layout. Deixamos quebrar em
     múltiplas linhas com espaçamento vertical adequado. --- */
  .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
  }
  .footer a {
    margin: 4px 8px;
    font-size: 0.75rem;
  }
}