/* ============================================================
   Clube Gotinhas do Vale — Lindóia-SP em 3D
   Substitui a tela do "livro que abre" por um passeio 3D pela
   cidade de Lindóia, com pontos turísticos reais que levam para
   as seções do próprio site. Todos os seletores usam o prefixo
   "lindoia-" para nunca colidir com o CSS do site (style.css).
   ============================================================ */

#lindoia-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #04263F;
  opacity: 1;
  transition: opacity 0.8s ease;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
#lindoia-intro.lindoia-exit {
  opacity: 0;
  pointer-events: none;
}

#lindoia-intro * { box-sizing: border-box; }

/* Garante que o atributo HTML "hidden" sempre funcione, mesmo em
   elementos que definem "display" explicitamente. Sem esta regra
   o navegador pode renderizar elementos mesmo estando "hidden". */
#lindoia-intro [hidden] { display: none !important; }

/* ---------- Tela de carregamento ---------- */
#lindoia-loading {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #005A9C 0%, #003A66 100%);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#lindoia-loading.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.lindoia-loading-card { text-align: center; color: #fff; }
.lindoia-droplet {
  width: 60px;
  height: 74px;
  animation: lindoia-bob 1.4s ease-in-out infinite;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.25));
}
.lindoia-droplet path { fill: #fff; }
.lindoia-droplet ellipse { fill: #7FB8E8; }
@keyframes lindoia-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.lindoia-loading-title {
  font-family: 'Chewy', cursive;
  font-size: 1.5rem;
  margin: 14px 0 18px;
}
.lindoia-loading-bar {
  width: 220px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.25);
  overflow: hidden;
  margin: 0 auto;
}
#lindoia-loading-fill {
  height: 100%;
  width: 0%;
  background: #FDB813;
  border-radius: 999px;
  transition: width 0.35s ease;
}
.lindoia-loading-hint {
  margin-top: 14px;
  font-size: 0.85rem;
  opacity: 0.85;
}

/* ---------- Fallback sem WebGL ---------- */
#lindoia-fallback {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFF8E7;
  padding: 24px;
}
.lindoia-fallback-card {
  max-width: 420px;
  text-align: center;
  background: #fff;
  border-radius: 22px;
  padding: 32px 28px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}
.lindoia-fallback-card h1 {
  font-family: 'Chewy', cursive;
  color: #005A9C;
  margin-top: 0;
  font-size: 1.6rem;
}
.lindoia-fallback-card p { color: #333; line-height: 1.5; }
.lindoia-fallback-btn {
  margin-top: 18px;
  background: #FDB813;
  color: #003A66;
  border: none;
  padding: 13px 22px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
}
.lindoia-fallback-btn:hover { background: #e6a30c; }

/* ---------- Palco 3D ---------- */
#lindoia-stage { position: fixed; inset: 0; z-index: 1; }
#lindoia-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

#lindoia-hotspot-layer { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.lindoia-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  will-change: left, top;
}
.lindoia-pin .lindoia-pin-bubble {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #FDB813;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 6px 14px rgba(0,0,0,0.3);
  transition: transform 0.18s ease;
  animation: lindoia-pulse 2.4s ease-in-out infinite;
}
.lindoia-pin:hover .lindoia-pin-bubble,
.lindoia-pin:focus-visible .lindoia-pin-bubble {
  transform: scale(1.15);
  border-color: #005A9C;
}
.lindoia-pin .lindoia-pin-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #003A66;
  background: rgba(255,255,255,0.92);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
@keyframes lindoia-pulse {
  0%, 100% { box-shadow: 0 6px 14px rgba(0,0,0,0.3), 0 0 0 0 rgba(253,184,19,0.55); }
  50% { box-shadow: 0 6px 14px rgba(0,0,0,0.3), 0 0 0 8px rgba(253,184,19,0); }
}

.lindoia-mascot {
  position: absolute;
  left: 18px;
  bottom: 90px;
  z-index: 10;
  max-width: 280px;
  background: #fff;
  border-radius: 14px;
  padding: 14px 32px 14px 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  animation: lindoia-pop-in 0.3s ease;
}
.lindoia-mascot p { margin: 0; }
.lindoia-mascot strong { color: #005A9C; }
#lindoia-mascot-close {
  position: absolute;
  top: 6px;
  right: 8px;
  border: none;
  background: none;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  color: #777;
}
@keyframes lindoia-pop-in {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.lindoia-nav-hint {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  background: rgba(0,30,50,0.78);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: opacity 0.5s ease;
  pointer-events: none;
  text-align: center;
  max-width: 90vw;
}
.lindoia-nav-hint.is-hidden { opacity: 0; }

.lindoia-recenter {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 8;
  background: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.82rem;
  color: #003A66;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.15s ease;
}
.lindoia-recenter.is-visible { opacity: 1; pointer-events: auto; }
.lindoia-recenter:hover { transform: translateY(-1px); }

.lindoia-skip {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 8;
  background: rgba(0,30,50,0.55);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}
.lindoia-skip:hover { background: rgba(0,30,50,0.8); }

.lindoia-legacy-btn {
  position: absolute;
  top: 62px;
  left: 16px;
  z-index: 8;
  background: rgba(0,30,50,0.55);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}
.lindoia-legacy-btn:hover { background: rgba(0,30,50,0.8); }

.lindoia-fpv-toggle {
  position: absolute;
  top: 108px;
  left: 16px;
  z-index: 8;
  background: rgba(0,30,50,0.55);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.lindoia-fpv-toggle:hover { background: rgba(0,30,50,0.8); }
.lindoia-fpv-toggle.is-active { background: #FDB813; color: #003A66; border-color: #FDB813; }

/* ---------- Joystick virtual (movimento manual do Aventureiro) ---------- */
.lindoia-joystick {
  position: absolute;
  bottom: 24px;
  right: 24px;
  z-index: 9;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  border: 2px solid rgba(255,255,255,0.55);
  touch-action: none;
  pointer-events: auto;
  cursor: grab;
}
.lindoia-joystick-nub {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
  border-radius: 50%;
  background: #FDB813;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: transform 0.06s linear;
  pointer-events: none;
}

/* ---------- Abertura clássica (vídeo do livro, sob demanda) ---------- */
.lindoia-legacy-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lindoia-legacy-video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}
.lindoia-legacy-prompt {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-family: 'Chewy', cursive;
  font-size: 1.6rem;
  text-align: center;
  padding: 24px;
}
.lindoia-legacy-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 81;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  color: #333;
}

/* ---------- Painel de conteúdo ---------- */
.lindoia-panel-overlay { position: fixed; inset: 0; z-index: 49; background: rgba(0,30,50,0.4); }

.lindoia-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 92vw);
  z-index: 50;
  background: #FFF8E7;
  box-shadow: -16px 0 30px rgba(0,0,0,0.25);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1);
  overflow-y: auto;
}
.lindoia-panel.is-open { transform: translateX(0); }
.lindoia-panel-inner { padding: 28px 24px 40px; position: relative; }
.lindoia-panel-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  color: #777;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.lindoia-panel-icon { font-size: 2.4rem; margin-bottom: 6px; }
#lindoia-panel-title { font-family: 'Chewy', cursive; color: #003A66; margin: 0 0 4px; font-size: 1.5rem; }
.lindoia-panel-subtitle { font-size: 0.8rem; font-weight: 700; color: #888; margin: 0 0 14px; text-transform: uppercase; letter-spacing: 0.03em; }
#lindoia-panel-body { font-size: 0.96rem; line-height: 1.55; color: #333; }
#lindoia-panel-body p { margin: 0 0 12px; }
.lindoia-people-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.lindoia-person-row { display: flex; align-items: center; gap: 12px; }
.lindoia-person-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: #005A9C;
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.95rem;
}
.lindoia-person-name { font-weight: 800; color: #333; display: block; }
.lindoia-person-role { font-size: 0.82rem; color: #777; }

.lindoia-feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 16px; }
.lindoia-feature-card { background: #fff; border-radius: 14px; padding: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.08); }
.lindoia-feature-card .fc-icon { font-size: 1.3rem; }
.lindoia-feature-card .fc-title { font-weight: 800; font-size: 0.82rem; display: block; margin: 4px 0 2px; color: #003A66; }
.lindoia-feature-card .fc-desc { font-size: 0.76rem; color: #777; line-height: 1.35; }

.lindoia-fact-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lindoia-fact-list li { display: flex; gap: 8px; align-items: flex-start; font-size: 0.88rem; color: #444; line-height: 1.45; }
.lindoia-fact-list .fact-ico { flex-shrink: 0; font-size: 0.95rem; line-height: 1.45; }

.lindoia-activity-tip {
  background: #FFF8E7;
  border-left: 4px solid #FDB813;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 4px 0 16px;
}
.lindoia-activity-tip .at-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #D99A06;
  margin-bottom: 4px;
}
.lindoia-activity-tip p { font-size: 0.86rem; color: #444; margin: 0 0 8px; line-height: 1.45; }
.lindoia-specialty-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.lindoia-specialty-tag {
  background: #005A9C;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.lindoia-panel-ctas { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.lindoia-panel-ctas a, .lindoia-panel-ctas button {
  text-align: center;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
  display: block;
  width: 100%;
}
.lindoia-panel-ctas .cta-primary { background: #FDB813; color: #003A66; }
.lindoia-panel-ctas .cta-secondary { background: #005A9C; color: #fff; }

/* ---------- Responsivo ---------- */
@media (max-width: 560px) {
  .lindoia-panel { width: 100%; }
  .lindoia-mascot { max-width: calc(100vw - 36px); bottom: 80px; }
  .lindoia-recenter { top: auto; bottom: 70px; right: 14px; }
  .lindoia-skip { top: 12px; left: 12px; }
  .lindoia-legacy-btn { top: 56px; left: 12px; }
  .lindoia-fpv-toggle { top: 100px; left: 12px; }
  .lindoia-joystick { bottom: 132px; right: 18px; width: 84px; height: 84px; }
  .lindoia-joystick-nub { width: 36px; height: 36px; margin: -18px 0 0 -18px; }
  .lindoia-nav-hint { bottom: auto; top: 12px; }
}

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  .lindoia-droplet { animation: none; }
  .lindoia-pin-bubble { animation: none; }
}

#lindoia-intro button:focus-visible,
#lindoia-intro a:focus-visible {
  outline: 3px solid #005A9C;
  outline-offset: 2px;
}
