/* =========================================
   TOUR PELO PAINEL
   Lista de telas à esquerda; a tela escolhida aparece na moldura
   do navegador, com a explicação logo abaixo.
========================================= */

.tour {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  gap: 40px;
  align-items: center;
}

/* ---------- Lista de telas ---------- */

.tour-tabs {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Fundo que desliza até a tela escolhida (posição e altura vêm do JS) */
.tour-indicator {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  border: 1px solid rgba(113, 63, 169, 0.25);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(113, 63, 169, 0.1);
  opacity: 0;
  transition:
    transform 450ms cubic-bezier(0.77, 0, 0.175, 1),
    height 450ms cubic-bezier(0.77, 0, 0.175, 1),
    opacity 200ms ease;
}

.tour-indicator.is-on {
  opacity: 1;
}

.tour-tab {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  padding: 12px 14px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--ink, #111111);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.tour-tab-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(113, 63, 169, 0.08);
  color: #713fa9;
  transition: background-color 300ms ease, color 300ms ease, transform 300ms var(--ease-out);
}

.tour-tab-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tour-tab strong {
  font-size: 0.95rem;
  font-weight: 600;
}

.tour-tab small {
  color: var(--gray-500, #6b6b6b);
  font-size: 0.8rem;
  line-height: 1.4;
}

.tour-tab.is-active .tour-tab-icon {
  background: #713fa9;
  color: #ffffff;
}

.tour-tab:focus-visible {
  outline: 2px solid #713fa9;
  outline-offset: 2px;
}

.tour-tab:active .tour-tab-icon {
  transform: scale(0.94);
}

@media (hover: hover) and (pointer: fine) {
  .tour-tab:not(.is-active):hover .tour-tab-icon {
    transform: translateY(-2px) rotate(-4deg);
  }

  .tour-tab:not(.is-active):hover strong {
    color: #713fa9;
  }
}

/* ---------- Monitor: moldura escura, queixo, pescoço e base ---------- */

.tour-stage {
  min-width: 0;
}

.tour-monitor {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 30px 40px rgba(17, 17, 17, 0.12));
}

.tour-bezel {
  position: relative;
  width: 100%;
  padding: 14px 12px 12px;
  border-radius: 16px 16px 0 0;
  background: #141416;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* Câmera no topo da moldura */
.tour-cam {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: #2c2c33;
  box-shadow: inset 0 0 0 1.5px #3a3a44;
}

/* Queixo prateado com o ponto roxo da marca */
.tour-chin {
  display: grid;
  place-items: center;
  width: 100%;
  height: 28px;
  border-radius: 0 0 16px 16px;
  background: linear-gradient(180deg, #ececf1, #d9d9e1);
}

.tour-chin span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #713fa9;
  box-shadow: 0 0 0 3px rgba(113, 63, 169, 0.15);
}

.tour-neck {
  width: 15%;
  height: 40px;
  background: linear-gradient(90deg, #cfcfd8, #e9e9ef 45%, #c6c6d0);
  clip-path: polygon(12% 0, 88% 0, 100% 100%, 0 100%);
}

.tour-base {
  width: 30%;
  height: 9px;
  border-radius: 6px 6px 12px 12px;
  background: linear-gradient(180deg, #e4e4ea, #c9c9d2);
}

.tour-frame {
  overflow: hidden;
  border-radius: 6px;
  background: #ffffff;
}

.tour-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 12px;
  border-bottom: 1px solid #efefef;
  background: #fafafa;
}

.tour-dots {
  display: flex;
  gap: 6px;
}

.tour-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e2e2e2;
}

.tour-dots i:first-child {
  background: #a880da;
}

.tour-address {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  padding: 5px 12px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #ececec;
  color: var(--gray-500, #6b6b6b);
  font-family: "DM Mono", monospace;
  font-size: 0.75rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tour-address b {
  color: #713fa9;
  font-weight: 500;
}

/* Telas empilhadas: só a escolhida aparece */
.tour-screen {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 9;
  background: #f6f5f9;
}

.tour-shot {
  grid-area: 1 / 1;
  position: relative;
  margin: 0;
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition:
    opacity 350ms ease,
    transform 500ms var(--ease-out);
  pointer-events: none;
}

.tour-shot.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.tour-shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

/* ---------- Prévia ilustrativa (quando o print ainda não existe) ---------- */

.tour-skeleton {
  position: absolute;
  inset: 0;
  display: none;
  grid-template-columns: 18% 1fr;
  gap: 4%;
  padding: 4%;
}

.tour-shot.no-img .tour-skeleton {
  display: grid;
}

.tour-skeleton i,
.tour-skeleton .sk-title {
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg, #ebe7f2 0%, #f6f3fa 50%, #ebe7f2 100%);
  background-size: 200% 100%;
  animation: skShimmer 1.8s ease-in-out infinite;
}

@keyframes skShimmer {
  from { background-position: 100% 0; }
  to   { background-position: -100% 0; }
}

.sk-side {
  display: flex;
  flex-direction: column;
  gap: 10%;
  padding: 10% 0;
}

.sk-side i {
  height: 8%;
}

.sk-side i:first-child {
  background: rgba(113, 63, 169, 0.25);
}

.sk-main {
  display: flex;
  flex-direction: column;
  gap: 6%;
}

.sk-title {
  width: 40%;
  height: 7%;
}

.sk-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4%;
  height: 26%;
}

.sk-rows {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6%;
}

.sk-rows i {
  flex: 1;
}

.tour-skeleton em {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--gray-500, #6b6b6b);
  font-size: 0.72rem;
  font-style: normal;
}

/* ---------- Explicação da tela ---------- */

.tour-infos {
  max-width: 620px;
  margin: 0 auto;
  padding: 20px 4px 0;
}

.tour-info h3 {
  margin-bottom: 6px;
  color: var(--ink, #111111);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tour-info p {
  max-width: 640px;
  color: var(--gray-600, #555555);
  font-size: 0.95rem;
  line-height: 1.65;
}

.tour-info ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  list-style: none;
}

.tour-info li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(113, 63, 169, 0.18);
  border-radius: 999px;
  background: rgba(113, 63, 169, 0.05);
  color: var(--ink, #111111);
  font-size: 0.84rem;
}

.tour-info li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #713fa9;
}

/* Texto e etiquetas entram em sequência ao trocar de tela */
.tour-info.is-active > * {
  animation: tourIn 450ms var(--ease-out) backwards;
}

.tour-info.is-active p  { animation-delay: 60ms; }
.tour-info.is-active ul { animation-delay: 120ms; }

@keyframes tourIn {
  from { opacity: 0; transform: translateY(8px); }
}

/* ---------- Celular e tablet: telas viram uma faixa que rola para o lado ---------- */

@media (max-width: 900px) {
  .tour {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .tour-tabs {
    flex-direction: row;
    gap: 8px;
    margin: 0 -16px;
    padding: 4px 16px 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .tour-tabs::-webkit-scrollbar {
    display: none;
  }

  .tour-indicator {
    display: none;
  }

  .tour-tab {
    flex-shrink: 0;
    gap: 10px;
    padding: 8px 14px 8px 8px;
    border: 1px solid #e8e8e8;
    border-radius: 999px;
    background: #ffffff;
    scroll-snap-align: start;
    transition: border-color 250ms ease, background-color 250ms ease;
  }

  .tour-tab.is-active {
    border-color: rgba(113, 63, 169, 0.4);
    background: rgba(113, 63, 169, 0.06);
  }

  .tour-tab-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
  }

  .tour-tab small {
    display: none;
  }

  .tour-tab strong {
    font-size: 0.88rem;
    white-space: nowrap;
  }

  .tour-bezel {
    padding: 12px 10px 10px;
    border-radius: 14px 14px 0 0;
  }

  .tour-cam {
    top: 4px;
    width: 4px;
    height: 4px;
    margin-left: -2px;
  }

  .tour-chin {
    height: 24px;
    border-radius: 0 0 14px 14px;
  }

  .tour-chin span {
    width: 7px;
    height: 7px;
  }

  .tour-neck {
    height: 34px;
  }

  .tour-base {
    height: 8px;
  }

  .tour-bar {
    padding: 10px 12px;
  }
}

/* Movimento reduzido: a troca vira só um esmaecer, sem brilho na prévia */
@media (prefers-reduced-motion: reduce) {
  .tour-shot {
    transform: none;
  }

  .tour-indicator {
    transition-duration: 250ms;
  }

  .tour-skeleton i,
  .tour-skeleton .sk-title {
    animation: none;
  }

  .tour-info.is-active > * {
    animation-name: nyxFade;
  }
}

/* =========================================
   TAMANHO PARA NOTEBOOK
   Lista e explicação à esquerda, monitor à direita: a seção inteira
   cabe numa tela de notebook (cerca de 650 px de altura útil).
========================================= */

.tour-section {
  padding-block: clamp(64px, 9vh, 96px);
}

.tour-section .section-header {
  max-width: 760px;
  margin-bottom: 20px;
}

.tour-section .section-header h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin-bottom: 8px;
}

.tour {
  grid-template-columns: minmax(240px, 330px) 1fr;
  grid-template-areas:
    "tabs  stage"
    "infos stage";
  grid-template-rows: auto 1fr;
  gap: 14px 48px;
  align-items: start;
}

.tour-tabs  { grid-area: tabs; }
.tour-stage { grid-area: stage; align-self: center; }
.tour-infos { grid-area: infos; }

/* Na lista basta o nome; os detalhes ficam na explicação */
.tour-tab small {
  display: none;
}

.tour-tabs {
  gap: 2px;
}

.tour-tab {
  gap: 12px;
  min-height: 40px;
  padding: 4px 12px 4px 4px;
}

.tour-tab-icon {
  width: 32px;
  height: 32px;
}

.tour-tab strong {
  font-size: 0.92rem;
}

/* O monitor encolhe também pela altura da janela */
.tour-monitor {
  max-width: min(600px, calc((100vh - 330px) * 1.5));
  min-width: 0;
}

.tour-infos {
  max-width: none;
  margin: 0;
  padding: 14px 4px 0;
  border-top: 1px solid #eeeeee;
}

.tour-info h3 {
  display: none;
}

.tour-info p {
  font-size: 0.88rem;
  line-height: 1.55;
}

.tour-info ul {
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
}

.tour-info li {
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.86rem;
}

@media (max-width: 900px) {
  .tour {
    grid-template-columns: 1fr;
    grid-template-areas:
      "tabs"
      "stage"
      "infos";
    grid-template-rows: none;
    gap: 16px;
  }

  .tour-monitor {
    max-width: 560px;
  }

  .tour-infos {
    border-top: 0;
    padding-top: 4px;
  }

  .tour-info h3 {
    display: block;
  }
}

/* Explicações empilhadas na mesma célula: a área tem sempre a altura da maior,
   então trocar de tela não empurra a lista nem o monitor */
.tour-infos {
  display: grid;
}

.tour-info {
  grid-area: 1 / 1;
}

.tour-info:not(.is-active) {
  visibility: hidden;
}

/* O monitor fica preso ao topo da coluna, sempre na mesma posição */
.tour-stage {
  align-self: start;
}

/* As telas usam dados de demonstração: aviso discreto no canto */
.tour-note {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(10, 15, 28, 0.75);
  color: #e6e9f0;
  font-size: 0.68rem;
  font-weight: 600;
  pointer-events: none;
}

.tour-shot.no-img ~ .tour-note,
.tour-screen:has(.tour-shot.is-active.no-img) .tour-note {
  display: none;
}

/* Barra do topo escura, combinando com o tema do painel */
.tour-bar {
  border-bottom-color: #1c2538;
  background: #0b1020;
}

.tour-dots i {
  background: #2a3348;
}

.tour-address {
  border-color: #1c2538;
  background: #0f1729;
  color: #8e99ad;
}

.tour-address b {
  color: #b58cf0;
}

.tour-screen {
  background: #0a0f1c;
}
