/* ==========================================================================
   COMPONENTES: cabeçalho, menu, botões, rótulos, bilhete, ficha, créditos,
   rodapé e botão flutuante do WhatsApp
   ========================================================================== */

/* Cabeçalho: pílula de vidro flutuante -------------------------------------
   Aproximação web de "vidro fosco" (backdrop-filter). O desfoque fica num
   pseudo-elemento para não virar bloco de contenção do menu mobile (fixed). */
.topo {
  position: fixed;
  inset: 0.75rem 0 auto;
  z-index: 50;
  padding-inline: var(--gutter);
  pointer-events: none;
}
.topo__pilula {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max-w);
  height: 4rem;
  margin-inline: auto;
  padding: 0 0.5rem 0 1.4rem;
  pointer-events: auto;
}
.topo__pilula::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(10, 12, 11, 0.55);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 18px 40px -18px rgba(0, 0, 0, 0.7);
}
@media (prefers-reduced-transparency: reduce) {
  .topo__pilula::before { background: var(--fundo-2); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.topo__marca { display: block; color: var(--texto); text-decoration: none; }
.topo__marca .logo { width: clamp(5.5rem, 4.8rem + 2vw, 6.75rem); height: auto; }

/* Barra de progresso de leitura na base da pílula */
.topo__progresso {
  position: absolute;
  left: 2rem;
  right: 2rem;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--verde);
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
}
@supports (animation-timeline: scroll()) {
  .topo__progresso {
    opacity: 1;
    animation: progresso linear both;
    animation-timeline: scroll(root);
  }
  @keyframes progresso { to { transform: scaleX(1); } }
}

.menu { display: flex; align-items: center; gap: clamp(0.75rem, 1.8vw, 1.75rem); }
.menu__lista {
  display: flex;
  gap: clamp(0.25rem, 1vw, 0.75rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu__lista a {
  position: relative;
  display: block;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  color: var(--texto-2);
  transition: color 0.25s, background-color 0.25s;
}
.menu__lista a:hover { color: var(--texto); background: rgba(255, 255, 255, 0.06); }
.menu__lista a[aria-current="true"] { color: var(--texto); background: rgba(4, 194, 92, 0.16); }

.topo__menu {
  display: none;
  position: relative;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--linha);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}
.topo__menu-linhas,
.topo__menu-linhas::before,
.topo__menu-linhas::after {
  position: absolute;
  left: 50%;
  width: 1.125rem;
  height: 2px;
  margin-left: -0.5625rem;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.35s var(--ease-out), background-color 0.2s;
}
.topo__menu-linhas { top: 50%; margin-top: -1px; }
.topo__menu-linhas::before,
.topo__menu-linhas::after { content: ""; left: 0; margin-left: 0; }
.topo__menu-linhas::before { transform: translateY(-6px); }
.topo__menu-linhas::after { transform: translateY(6px); }
.topo__menu[aria-expanded="true"] .topo__menu-linhas { background: transparent; }
.topo__menu[aria-expanded="true"] .topo__menu-linhas::before { transform: rotate(45deg); background: var(--texto); }
.topo__menu[aria-expanded="true"] .topo__menu-linhas::after { transform: rotate(-45deg); background: var(--texto); }

/* Entre 960 e 1180 px a CTA do menu vira só o ícone, para a navegação caber numa linha */
@media (min-width: 960px) and (max-width: 1179px) {
  .menu .menu__cta { width: 3rem; min-height: 3rem; padding: 0; font-size: 0; gap: 0; }
  .menu .menu__cta .icone { width: 1.35rem; height: 1.35rem; }
}

@media (max-width: 959px) {
  .topo__menu { display: block; z-index: 2; }
  .topo__marca { position: relative; z-index: 2; }
  .menu {
    position: fixed;
    inset: 0;
    z-index: 1;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 2rem;
    padding: calc(var(--topo-h) + 1.5rem) var(--gutter) max(2rem, env(safe-area-inset-bottom));
    background:
      radial-gradient(40rem 26rem at 110% 110%, rgba(4, 194, 92, 0.25), transparent 60%),
      var(--fundo);
    clip-path: circle(0% at calc(100% - 3rem) 2.75rem);
    visibility: hidden;
    transition: clip-path 0.6s var(--ease-out), visibility 0s 0.6s;
  }
  .menu.menu--aberto {
    clip-path: circle(150% at calc(100% - 3rem) 2.75rem);
    visibility: visible;
    transition: clip-path 0.7s var(--ease-out);
  }
  .menu__lista { flex-direction: column; gap: 0.25rem; }
  .menu__lista a {
    padding: 0.35rem 0;
    background: none !important;
    font-size: clamp(2rem, 1.3rem + 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--texto);
  }
  .menu__lista a[aria-current="true"] { color: var(--verde); }
  .menu__lista li { opacity: 0; transform: translateY(20px); transition: opacity 0.4s, transform 0.5s var(--ease-out); }
  .menu--aberto .menu__lista li { opacity: 1; transform: none; }
  .menu--aberto .menu__lista li:nth-child(2) { transition-delay: 0.05s; }
  .menu--aberto .menu__lista li:nth-child(3) { transition-delay: 0.1s; }
  .menu--aberto .menu__lista li:nth-child(4) { transition-delay: 0.15s; }
  .menu--aberto .menu__lista li:nth-child(5) { transition-delay: 0.2s; }
  .menu__cta { align-self: flex-start; min-height: 3.5rem; padding-inline: 1.75rem; }
}

/* Botões -------------------------------------------------------------- */
.botao {
  --botao-fundo: var(--fundo-3);
  --botao-texto: var(--texto);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0.8rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--botao-fundo);
  color: var(--botao-texto);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.35s var(--ease-out), background-color 0.25s, border-color 0.25s, box-shadow 0.35s;
}
.botao:active { transform: translateY(1px) scale(0.98); }
.botao .icone { width: 1.25em; height: 1.25em; }
.botao .icone--seta { transition: transform 0.35s var(--ease-out); }
.botao:hover .icone--seta { transform: translateX(4px); }

.botao--grande { min-height: 3.5rem; padding: 1rem 1.75rem; font-size: 1rem; }
.botao--gigante { min-height: 4.5rem; padding: 1.25rem 2.5rem; font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem); }
.botao--gigante .icone { width: 1.5em; height: 1.5em; }

.botao--verde { --botao-fundo: var(--verde); --botao-texto: var(--tinta); }
.botao--verde:hover {
  --botao-fundo: var(--verde-claro);
  box-shadow: 0 14px 34px -14px rgba(4, 194, 92, 0.75);
}

/* Botão de vidro: contorno + fundo translúcido, legível sobre foto */
.botao--vidro {
  --botao-fundo: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.botao--vidro:hover { --botao-fundo: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.6); }

/* Botão magnético: js/modules/ponteiro.js escreve --mx/--my */
.magnetico { translate: var(--mx, 0px) var(--my, 0px); transition: translate 0.5s var(--ease-mola), transform 0.35s var(--ease-out), background-color 0.25s, box-shadow 0.35s; }

/* Rótulos e títulos -------------------------------------------------------- */
.rotulo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--verde);
}
@media (max-width: 559px) { .rotulo { letter-spacing: 0.18em; } }

.titulo {
  font-size: var(--fs-lg);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

/* Selo de status e ficha técnica ---------------------------------------- */
.selo-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--linha-forte);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--texto-2);
}
.selo-status .icone { width: 1rem; height: 1rem; }
.selo-status--proxima { border-color: var(--verde); background: var(--verde); color: var(--tinta); }

.ficha { display: grid; gap: 0.1rem; }
.ficha > div {
  display: grid;
  grid-template-columns: minmax(7rem, 34%) 1fr;
  gap: 1rem;
  padding: 0.7rem 0;
}
.ficha > div + div { border-top: 1px solid var(--linha); }
.ficha dt {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--texto-3);
  padding-top: 0.2rem;
}
.ficha dd { font-weight: 600; }

/* Bilhete da próxima saída ------------------------------------------------
   Objeto "físico" em papel: recortes laterais por máscara radial e picote
   tracejado entre corpo e canhoto. Inclinação 3D por js/modules/ponteiro.js. */
.bilhete {
  --furo: 0.9rem;
  position: relative;
  display: grid;
  width: 100%;
  max-width: 25rem;
  color: var(--tinta);
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.45));
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) rotate(-3deg);
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease-out);
}
.bilhete__corpo {
  display: grid;
  gap: 1.25rem;
  padding: 1.5rem 1.5rem 1.35rem;
  background: var(--papel);
  border-radius: var(--raio) var(--raio) 0 0;
  -webkit-mask: radial-gradient(circle var(--furo) at 0 100%, transparent 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--furo) at 100% 100%, transparent 98%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle var(--furo) at 0 100%, transparent 98%, #000) left / 51% 100% no-repeat,
        radial-gradient(circle var(--furo) at 100% 100%, transparent 98%, #000) right / 51% 100% no-repeat;
}
.bilhete__topo { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.bilhete__etiqueta {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.bilhete__contagem {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: var(--tinta);
  color: var(--verde);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  white-space: nowrap;
}
.bilhete__rota { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 0.75rem; }
.bilhete__cidade { display: grid; line-height: 1.1; }
.bilhete__cidade small {
  margin-bottom: 0.3rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(10, 12, 11, 0.6);
}
.bilhete__cidade strong { font-family: var(--font-display); font-size: 1.1rem; font-weight: 800; letter-spacing: -0.02em; }
.bilhete__cidade span {
  margin-top: 0.2rem;
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
}
.bilhete__cidade--destino { text-align: right; }
.bilhete__cidade--destino span { color: #067a3c; }
.bilhete__trajeto { position: relative; display: grid; place-items: center; width: 4rem; height: 2.2rem; margin-bottom: 0.4rem; }
.bilhete__linha { position: absolute; inset: 50% 0 auto; border-top: 2px dashed rgba(10, 12, 11, 0.35); }
.bilhete__trajeto .icone { position: relative; width: 1.7rem; height: 1.7rem; padding: 0.2rem; background: var(--papel); }
.bilhete__datas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(10, 12, 11, 0.14);
}
.bilhete__datas dt { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(10, 12, 11, 0.6); }
.bilhete__datas dd { font-family: var(--font-display); font-size: 1.05rem; font-weight: 800; }
.bilhete__datas div:last-child { text-align: right; }
.bilhete__canhoto {
  position: relative;
  display: grid;
  gap: 0.75rem;
  padding: 1.15rem 1.5rem 1.35rem;
  background: var(--verde);
  border-radius: 0 0 var(--raio) var(--raio);
  color: var(--tinta);
  text-decoration: none;
  -webkit-mask: radial-gradient(circle var(--furo) at 0 0, transparent 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--furo) at 100% 0, transparent 98%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle var(--furo) at 0 0, transparent 98%, #000) left / 51% 100% no-repeat,
        radial-gradient(circle var(--furo) at 100% 0, transparent 98%, #000) right / 51% 100% no-repeat;
  transition: background-color 0.25s;
}
.bilhete__canhoto::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc(var(--furo) + 0.4rem);
  right: calc(var(--furo) + 0.4rem);
  border-top: 2px dashed rgba(10, 12, 11, 0.45);
}
.bilhete__canhoto:hover { background: var(--verde-claro); }
.bilhete__codigo {
  height: 2.1rem;
  background: repeating-linear-gradient(90deg,
    var(--tinta) 0 2px, transparent 2px 4px,
    var(--tinta) 4px 5px, transparent 5px 8px,
    var(--tinta) 8px 11px, transparent 11px 12px,
    var(--tinta) 12px 13px, transparent 13px 16px);
  opacity: 0.85;
}
.bilhete__reservar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
}
.bilhete__reservar .icone { transition: transform 0.3s var(--ease-out); }
.bilhete__canhoto:hover .bilhete__reservar .icone { transform: translateX(4px); }

/* Crédito de foto ------------------------------------------------------- */
.credito { font-size: 0.6875rem; letter-spacing: 0.02em; color: var(--texto-3); }

/* Rodapé ---------------------------------------------------------------- */
.rodape {
  position: relative;
  overflow: clip;
  padding-top: clamp(4rem, 3rem + 4vw, 6rem);
  border-top: 1px solid var(--linha);
  background: var(--fundo);
  color: var(--texto-2);
  font-size: var(--fs-sm);
}
.rodape__grade {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}
.rodape__frase {
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--texto);
}
.rodape__titulo {
  margin-bottom: 1.1rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--texto);
}
.rodape__coluna ul { display: grid; gap: 0.7rem; }
.rodape__coluna a,
.rodape__coluna span { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; transition: color 0.2s; }
.rodape__coluna a:hover { color: var(--verde); }
.rodape__coluna .icone { width: 1.15rem; height: 1.15rem; color: var(--verde); }
.rodape__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 1.75rem;
  border-top: 1px solid var(--linha);
  font-size: var(--fs-xs);
}
.creditos { max-width: 42rem; }
.creditos summary { cursor: pointer; color: var(--texto); font-weight: 600; }
.creditos p { margin-top: 0.75rem; line-height: 1.7; }
.creditos a { color: var(--verde); }

/* Logo gigante cortado na base da página */
.rodape__marca-gigante {
  height: clamp(8rem, 30vw, 27rem);
  margin-top: 1rem;
  padding-inline: var(--gutter);
  overflow: clip;
  -webkit-mask: linear-gradient(to bottom, #000 55%, transparent);
  mask: linear-gradient(to bottom, #000 55%, transparent);
}
.rodape__marca-gigante .logo { --pin: var(--mata-2); width: 100%; max-width: var(--max-w); height: auto; margin-inline: auto; color: var(--fundo-3); }

@media (max-width: 759px) {
  .rodape__grade { grid-template-columns: 1fr 1fr; }
  .rodape__frase { grid-column: 1 / -1; }
}
@media (max-width: 379px) { .rodape__grade { grid-template-columns: 1fr; } }

/* Botão flutuante do WhatsApp (aparece depois do hero) ----------------- */
.whats-flutuante {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  background: var(--verde);
  color: var(--tinta);
  box-shadow: 0 14px 30px -10px rgba(4, 194, 92, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(1rem) scale(0.8);
  transition: opacity 0.35s var(--ease-out), transform 0.45s var(--ease-mola), visibility 0s 0.35s, background-color 0.2s;
}
.whats-flutuante .icone { width: 1.75rem; height: 1.75rem; }
.whats-flutuante.visivel {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.35s var(--ease-out), transform 0.45s var(--ease-mola), background-color 0.2s;
}
.whats-flutuante:hover { background: var(--verde-claro); }
