:root {
  --green: #3f7d3a;
  --green-dark: #2c5e28;
  --cream: #f5f0e4;
  --ink: #1d2b1c;
  --amber: #e8b44a;
  --card-bg: rgba(245, 240, 228, 0.94);
}

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

html, body {
  height: 100%;
  overflow: hidden;
  font-family: "DM Sans", system-ui, sans-serif;
  background: #a8d8ea;
  color: var(--ink);
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* ---------- Loader ---------- */
#loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: linear-gradient(160deg, #2c5e28, #3f7d3a);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  transition: opacity 0.6s ease, visibility 0.6s;
}
#loader.done { opacity: 0; visibility: hidden; }
.loader-logo {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 900;
  letter-spacing: 0.35em;
  color: var(--cream);
  text-indent: 0.35em;
}
.loader-bar {
  width: min(260px, 60vw);
  height: 4px;
  border-radius: 99px;
  background: rgba(245, 240, 228, 0.25);
  overflow: hidden;
}
.loader-bar span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: var(--amber);
  transition: width 0.3s ease;
}
.loader-text { color: rgba(245, 240, 228, 0.8); font-size: 0.85rem; letter-spacing: 0.08em; }

/* ---------- Header ---------- */
.ui-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  pointer-events: none;
}
.brand { display: flex; flex-direction: column; gap: 2px; }
.brand-name {
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 0.3em;
  color: var(--ink);
}
.brand-tag { font-size: 0.7rem; letter-spacing: 0.05em; opacity: 0.75; }
.counter {
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--card-bg);
  padding: 8px 14px;
  border-radius: 99px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.counter em { opacity: 0.4; font-style: normal; margin: 0 3px; }

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}
.btn-walk {
  border: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--cream);
  background: var(--green);
  padding: 10px 18px;
  border-radius: 99px;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  transition: background 0.2s, transform 0.15s;
}
.btn-walk:hover { background: var(--green-dark); transform: scale(1.04); }

/* ---------- Modo a pé ---------- */
.walk-key {
  display: inline-block;
  font-weight: 900;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  background: var(--ink);
  color: var(--cream);
  padding: 4px 10px;
  border-radius: 8px;
  border-bottom: 3px solid rgba(0, 0, 0, 0.45);
}
.walk-prompt {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: 110px;
  transform: translate(-50%, 12px);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  padding: 12px 20px;
  border-radius: 99px;
  box-shadow: 0 10px 32px rgba(29, 43, 28, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.walk-prompt.visible { opacity: 1; transform: translate(-50%, 0); }
.walk-hint {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.85;
  pointer-events: none;
}
body.walk-mode .walk-hint { display: flex; }
body.walk-mode .ui-dots,
body.walk-mode .ui-arrows,
body.walk-mode .ui-hint { display: none; }

/* ---------- Card ---------- */
.ui-card {
  position: fixed;
  z-index: 10;
  left: 28px;
  bottom: 28px;
  width: min(420px, calc(100vw - 56px));
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 26px 28px;
  box-shadow: 0 16px 48px rgba(29, 43, 28, 0.18);
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}
.ui-card.hidden-card { transform: translateY(30px); opacity: 0; pointer-events: none; }
.card-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-dark);
  background: rgba(63, 125, 58, 0.14);
  padding: 5px 12px;
  border-radius: 99px;
  margin-bottom: 12px;
}
.card-title {
  font-size: clamp(1.3rem, 3.4vw, 1.7rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 10px;
}
.card-text { font-size: 0.92rem; line-height: 1.55; opacity: 0.85; }
.card-bullets { list-style: none; margin-top: 12px; display: grid; gap: 6px; }
.card-bullets li {
  font-size: 0.84rem;
  line-height: 1.4;
  padding-left: 20px;
  position: relative;
}
.card-bullets li::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--amber);
}
.card-cta {
  display: inline-block;
  margin-top: 16px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--cream);
  background: var(--green);
  padding: 11px 22px;
  border-radius: 99px;
  text-decoration: none;
  transition: background 0.2s;
}
.card-cta:hover { background: var(--green-dark); }

/* ---------- Dots ---------- */
.ui-dots {
  position: fixed;
  z-index: 10;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ui-dots button {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: transparent;
  cursor: pointer;
  opacity: 0.4;
  transition: all 0.25s;
  padding: 0;
}
.ui-dots button.active {
  opacity: 1;
  background: var(--green);
  border-color: var(--green);
  transform: scale(1.35);
}

/* ---------- Setas ---------- */
.ui-arrows {
  position: fixed;
  z-index: 10;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ui-arrows button {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--card-bg);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s, background 0.2s;
}
.ui-arrows button:hover { transform: scale(1.08); background: var(--cream); }
.ui-arrows button:disabled { opacity: 0.35; cursor: default; transform: none; }

/* ---------- Dica ---------- */
.ui-hint {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.75;
  transition: opacity 0.5s;
  pointer-events: none;
}
.ui-hint.fade { opacity: 0; }
.hint-mouse {
  width: 20px; height: 32px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  position: relative;
}
.hint-mouse span {
  position: absolute;
  left: 50%; top: 6px;
  width: 3px; height: 7px;
  border-radius: 3px;
  background: var(--ink);
  transform: translateX(-50%);
  animation: wheel 1.6s ease-in-out infinite;
}
@keyframes wheel {
  0% { transform: translate(-50%, 0); opacity: 1; }
  70% { transform: translate(-50%, 10px); opacity: 0; }
  100% { transform: translate(-50%, 0); opacity: 0; }
}

/* ---------- Rótulos 3D ---------- */
.poi-label {
  position: fixed;
  z-index: 5;
  transform: translate(-50%, -100%);
  background: var(--card-bg);
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.4s;
}
.poi-label.visible { opacity: 1; }
.poi-label::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -5px;
  transform: translateX(-50%) rotate(45deg);
  width: 10px; height: 10px;
  background: var(--card-bg);
  border-radius: 2px;
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .brand-tag { display: none; }
  .btn-walk { display: none; }
  .ui-card {
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
    padding: 18px 20px;
  }
  .card-text { font-size: 0.85rem; }
  .card-bullets li { font-size: 0.78rem; }
  .ui-dots { right: 12px; gap: 10px; }
  .ui-arrows { display: none; }
  .ui-hint { bottom: auto; top: 76px; }
}
