/* =========================================================
   Visita 360° à pintura dos arcos
   ========================================================= */

/* ---------- botão em cima da pintura ---------- */
.arcos__enter {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 2;
  display: grid; justify-items: center; gap: 14px; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--creme); -webkit-tap-highlight-color: transparent;
}
.arcos__enter[hidden] { display: none; }
.arcos__ring {
  position: relative; display: grid; place-items: center;
  width: clamp(96px, 11vw, 128px); aspect-ratio: 1; border-radius: 50%;
  background: rgba(58, 32, 26, .42); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  transition: transform .6s cubic-bezier(.34, 1.5, .5, 1), background .4s;
  animation: tourPulse 3.2s ease-in-out infinite;
}
.arcos__ring svg { position: absolute; inset: -8%; width: 116%; height: 116%; overflow: visible; filter: url(#rough); animation: slowSpin 18s linear infinite; }
.arcos__ring path { stroke-dasharray: .82 .18; }
.arcos__ring b { font-weight: 250; font-size: clamp(1.7rem, 2.6vw, 2.2rem); letter-spacing: .02em; }
.arcos__label {
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 999px; background: rgba(58, 32, 26, .55);
}
.arcos__enter:hover .arcos__ring { transform: scale(1.1); background: rgba(58, 32, 26, .6); }
.arcos__enter:focus-visible { outline: none; }
.arcos__enter:focus-visible .arcos__ring { outline: 2px solid var(--creme); outline-offset: 6px; }
.arcos__enter.is-loading .arcos__ring { animation: tourPulse .7s ease-in-out infinite; }
.arcos img { cursor: pointer; }
@keyframes tourPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251, 240, 223, .35); }
  50% { box-shadow: 0 0 0 18px rgba(251, 240, 223, 0); }
}

/* ---------- visita (ecrã inteiro) ---------- */
.tour {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; overflow: hidden; background: #2b1813; color: var(--creme);
}
.tour::backdrop { background: rgba(43, 24, 19, .4); }
.tour__stage {
  position: absolute; inset: 0; overflow: hidden; cursor: grab; touch-action: none; outline: none;
  user-select: none; -webkit-user-select: none;
}
.tour__stage.is-grab { cursor: grabbing; }
.tour__cyl { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; will-change: transform; }
.tour__cyl i {
  position: absolute; left: 0; top: 0; display: block;
  background-repeat: no-repeat; backface-visibility: hidden;
}
.tour__vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 75% 70% at 50% 50%, transparent 55%, rgba(43, 24, 19, .55) 100%);
}

.tour__ui { position: absolute; inset: 0; pointer-events: none; display: grid; grid-template-rows: auto 1fr auto; }
.tour__ui > * { pointer-events: auto; }
.tour__top, .tour__bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  padding: max(16px, env(safe-area-inset-top, 0px) + 10px) var(--gutter) 16px;
  background: linear-gradient(to bottom, rgba(43, 24, 19, .6), transparent);
}
.tour__bottom {
  padding: 20px var(--gutter) max(18px, env(safe-area-inset-bottom, 0px) + 12px);
  background: linear-gradient(to top, rgba(43, 24, 19, .65), transparent);
}
.tour__title { margin: 0; display: grid; gap: 4px; pointer-events: none; }
.tour__title .display { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.tour__title span:last-child { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--areia); }
.tour__btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 18px;
  border: 1px solid rgba(251, 240, 223, .45); border-radius: 999px; cursor: pointer;
  background: rgba(43, 24, 19, .45); color: var(--creme); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; transition: background .25s, border-color .25s, color .25s;
}
.tour__btn:hover { border-color: var(--creme); background: rgba(43, 24, 19, .7); }
.tour__btn[aria-pressed="true"] { background: var(--creme); color: var(--cacau); border-color: var(--creme); }
.tour__btn[hidden] { display: none; }
.tour__btn--icon { width: 42px; padding: 0; justify-content: center; font-size: 20px; letter-spacing: 0; }
.tour__btn span { font-size: 18px; line-height: 1; }
.tour__controls { display: flex; flex-wrap: wrap; gap: 8px; }

.tour__caption {
  align-self: end; justify-self: center; margin: 0 var(--gutter) 8px; text-align: center; pointer-events: none;
  font-family: var(--f-display); font-weight: 250; font-variation-settings: "wdth" 62.5; text-transform: uppercase;
  font-size: clamp(1.6rem, 3.6vw, 2.8rem); line-height: 1; max-width: 22ch;
  text-shadow: 0 2px 24px rgba(43, 24, 19, .8), 0 1px 3px rgba(43, 24, 19, .6);
  opacity: 0;
}
.tour__caption.is-on { animation: tourCap 5.6s var(--ease) both; }
@keyframes tourCap {
  0% { opacity: 0; transform: translateY(14px); filter: blur(4px); }
  14%, 82% { opacity: 1; transform: none; filter: none; }
  100% { opacity: 0; transform: translateY(-8px); }
}
.tour__hint {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; margin: 0; pointer-events: none;
  padding: 10px 18px; border-radius: 999px; background: rgba(43, 24, 19, .55); backdrop-filter: blur(4px);
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase; transition: opacity .6s; white-space: nowrap;
  animation: tourSway 2.4s ease-in-out infinite;
}
.tour__hint.is-off { opacity: 0; }
@keyframes tourSway { 50% { transform: translateX(14px); } }

.tour__map {
  position: relative; flex: 0 1 280px; height: 34px; border-radius: 8px; overflow: hidden; cursor: pointer;
  background-size: 100% 100%; box-shadow: 0 0 0 1px rgba(251, 240, 223, .35); opacity: .85;
}
.tour__map::after { content: ""; position: absolute; inset: 0; background: rgba(43, 24, 19, .45); }
.tour__map i {
  position: absolute; top: 0; bottom: 0; z-index: 1; border: 1.5px solid var(--creme); border-radius: 6px;
  translate: -0% 0; box-shadow: 0 0 0 999px rgba(43, 24, 19, 0); background: rgba(251, 240, 223, .12);
}
@media (max-width: 600px) {
  .tour__map { flex-basis: 100%; }
  .tour__controls { width: 100%; justify-content: center; }
}

/* entrada */
.tour.is-shown .tour__top, .tour.is-shown .tour__bottom { animation: fadeIn .8s ease .5s both; }

@media (prefers-reduced-motion: reduce) {
  .arcos__ring, .arcos__ring svg, .tour__hint { animation: none; }
}
