/* Trekka landing v3 — feita primeiro para ~375px. Cores da marca oficial. */
:root {
  --asfalto: #0B0B0C;
  --painel: #141416;
  --painel-2: #1C1C1F;
  --linha: #2A2A2E;
  --papel: #F5F5F5;
  --cinza: #A3A3A8;
  --farol: #FF6B00;
  --ok: #5FD08A;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  --pad: 1.25rem;
  font-family: 'Instrument Sans', system-ui, sans-serif;
  color: var(--papel);
  background: var(--asfalto);
  color-scheme: dark;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
svg { display: block; }
svg path { fill: none; stroke: var(--farol); stroke-width: 22; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: var(--farol); color: var(--asfalto); }
:focus-visible { outline: 3px solid var(--farol); outline-offset: 4px; border-radius: 4px; }
.wrap { width: min(100% - 2 * var(--pad), 68rem); margin-inline: auto; }
.skip { position: fixed; top: .75rem; left: .75rem; z-index: 50; padding: .9rem 1rem; background: var(--papel); color: var(--asfalto); transform: translateY(-300%); }
.skip:focus { transform: none; }

/* Tipografia */
h1, h2 { font-weight: 600; letter-spacing: -.045em; line-height: 1; text-wrap: balance; }
h1 em, h2 em { font-family: 'Source Serif 4', Georgia, serif; font-style: italic; font-weight: 450; letter-spacing: -.035em; color: var(--farol); }
h2 { font-size: clamp(2.15rem, 9.6vw, 3.6rem); line-height: 1.04; }
h3 { font-weight: 600; font-size: 1.3rem; letter-spacing: -.025em; line-height: 1.2; }
.eyebrow { font-size: .9375rem; font-weight: 500; color: var(--cinza); letter-spacing: .01em; margin-bottom: 1rem; display: flex; align-items: center; gap: .6rem; }
.eyebrow::before { content: ''; width: 1.5rem; height: 2px; background: var(--farol); border-radius: 2px; }

/* Topo */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .7rem var(--pad); background: color-mix(in srgb, var(--asfalto) 82%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.top.is-stuck { border-bottom-color: var(--linha); }
.brand { display: inline-flex; align-items: center; gap: .3rem; min-height: 44px; font-weight: 600; font-size: 1.6rem; letter-spacing: -.03em; }
.brand svg { width: 1.6rem; height: 1.6rem; }
.top-nav { display: flex; align-items: center; gap: .35rem; }
.top-login { display: inline-flex; align-items: center; min-height: 44px; padding-inline: .7rem; font-size: 1rem; color: var(--cinza); }
.top-cta { display: inline-flex; align-items: center; min-height: 40px; padding-inline: .95rem; border-radius: 999px; background: var(--papel); color: var(--asfalto); font-weight: 600; font-size: .9375rem; transition: transform .2s var(--ease-out); }
.top-cta:active { transform: scale(.96); }
.top-cta, .top-login { white-space: nowrap; }
/* Telas de 320px: aperta o topo e a lista da viagem para nada quebrar linha */
@media (max-width: 359px) {
  :root { --pad: 1rem; }
  .brand { font-size: 1.45rem; }
  .brand svg { width: 1.45rem; height: 1.45rem; }
  .top-login { padding-inline: .45rem; }
  .top-cta { padding-inline: .8rem; }
  .manifest-route { font-size: 1rem; }
  .manifest-route .rw { display: none; }
  .manifest-seats b { font-size: 1.8rem; }
  .manifest-card { padding-inline: 1rem; }
  .qty { display: none; }
}

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .75rem; min-height: 56px; padding: 0 1.4rem; border-radius: 999px; font-size: 1.0625rem; font-weight: 600; letter-spacing: -.01em; transition: transform .2s var(--ease-out), background-color .2s; }
.btn span { transition: transform .3s var(--ease-out); }
.btn:hover span { transform: translateX(4px); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--farol); color: var(--asfalto); }
.btn-ghost { border: 1px solid var(--linha); background: var(--painel); }
.btn-dark { background: var(--asfalto); color: var(--papel); }
.btn-dark:focus-visible, .btn-line:focus-visible { outline-color: var(--asfalto); }
.btn-line { border: 2px solid var(--asfalto); color: var(--asfalto); }

/* HERO */
.hero { padding: 2rem var(--pad) 3.5rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; max-width: 68rem; margin-inline: auto; }
h1 { font-size: clamp(3.4rem, 17.5vw, 6.2rem); line-height: .93; letter-spacing: -.055em; }
h1 > span { display: block; }
h1 em { display: block; margin-top: .28em; font-size: .56em; line-height: 1.08; }
.hero-sub { margin-top: 1.5rem; font-size: 1.125rem; line-height: 1.55; color: var(--cinza); max-width: 30rem; }
.hero-actions { margin-top: 1.75rem; display: grid; gap: .85rem; justify-items: start; }
.hero-actions .btn { width: 100%; max-width: 24rem; }
.hero-note { font-size: .9375rem; color: var(--cinza); }

/* Entrada da primeira tela: uma sequência só */
.load { animation: rise .8s var(--ease-out) both; animation-delay: calc(var(--d) * 90ms + 80ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* Lista da viagem */
.manifest { position: relative; }
.manifest figcaption { margin-top: .7rem; font-size: .8125rem; color: #77777C; text-align: right; }
.manifest-card { position: relative; padding: 1.15rem 1.15rem .95rem; border-radius: 1.4rem; background: linear-gradient(180deg, var(--painel-2), var(--painel)); border: 1px solid var(--linha); box-shadow: 0 30px 60px -30px #000, 0 0 0 1px #ffffff08 inset; }
.manifest-card::before { content: ''; position: absolute; inset: -40% -10% auto; height: 70%; background: radial-gradient(closest-side, #ff6b0026, transparent); z-index: -1; pointer-events: none; }
.manifest-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; }
.manifest-label { font-size: .875rem; color: var(--cinza); }
.manifest-route { margin-top: .2rem; display: flex; align-items: center; gap: .3rem; font-weight: 600; font-size: 1.0625rem; letter-spacing: -.02em; white-space: nowrap; }
.manifest-route svg { width: .95rem; height: .95rem; }
.manifest-seats { font-variant-numeric: tabular-nums; text-align: right; line-height: 1; white-space: nowrap; }
.manifest-seats b { font-size: 2.1rem; font-weight: 600; letter-spacing: -.04em; display: inline-block; }
.manifest-seats b.bump { animation: bump .5s var(--ease-spring); }
@keyframes bump { 40% { transform: translateY(-5px) scale(1.12); color: var(--farol); } }
.manifest-seats span { font-size: 1.1rem; color: var(--cinza); }
.manifest-seats small { display: block; margin-top: .25rem; font-size: .8125rem; color: var(--cinza); }
.manifest-bar { height: 5px; margin: .95rem 0 .35rem; border-radius: 5px; background: var(--linha); overflow: hidden; }
.manifest-bar i { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--farol); transform-origin: left; transform: scaleX(.7333); transition: transform .9s var(--ease-out); }
.manifest-list li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: .6rem; padding: .78rem 0; border-top: 1px solid var(--linha); font-size: .9375rem; animation: rise .6s var(--ease-out) both; animation-delay: calc(var(--r, 0) * 110ms + 700ms); }
.manifest-list li:first-child { border-top: 0; }
.who { font-weight: 500; }
.qty { color: var(--cinza); font-size: .875rem; }
.tag { font-size: .8125rem; font-weight: 500; padding: .28rem .6rem; border-radius: 999px; white-space: nowrap; }
.tag.ok { color: var(--ok); background: #5fd08a1c; }
.tag.wait { color: #E9C46A; background: #e9c46a1c; }
.tag.new { color: var(--asfalto); background: var(--farol); }
/* A reserva que chega: o momento que a página quer que você veja */
.manifest-list li.incoming { animation: none; display: grid; overflow: hidden; max-height: 0; padding-block: 0; opacity: 0; border-top-color: transparent; transform: translateX(22px); transition: max-height .55s var(--ease-out), padding .55s var(--ease-out), opacity .45s .12s, transform .7s var(--ease-spring) .08s, border-color .4s; }
.manifest-list li.incoming.is-in { max-height: 3.6rem; padding-block: .78rem; opacity: 1; transform: none; border-top-color: var(--linha); }
.manifest-link { display: flex; align-items: center; gap: .5rem; margin-top: .55rem; padding-top: .8rem; border-top: 1px dashed var(--linha); font-size: .8125rem; color: var(--cinza); opacity: 0; transition: opacity .5s .3s; }
.manifest-link.is-in { opacity: 1; }
.dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--farol); box-shadow: 0 0 0 0 #ff6b0080; animation: ping 2.2s infinite; }
@keyframes ping { 70%, 100% { box-shadow: 0 0 0 .55rem #ff6b0000; } }

/* Seções */
.mess, .steps, .plain { padding-block: 4.5rem; }
.feats { padding-block: 4.5rem 4rem; }
.mess { background: var(--painel); border-block: 1px solid var(--linha); }

/* Antes: mensagens soltas que se alinham */
.mess-stage { position: relative; margin-top: 2.25rem; display: grid; gap: .6rem; }
.bubble { --x: 0px; --rot: 0deg; justify-self: start; max-width: 88%; transform: translateX(var(--x)) rotate(var(--rot)); transition: transform 1s var(--ease-spring), opacity .6s; transition-delay: calc(var(--i, 0) * 90ms); }
.bubble span { display: block; padding: .8rem 1rem; border-radius: 1.15rem 1.15rem 1.15rem .3rem; background: var(--painel-2); border: 1px solid var(--linha); font-size: 1rem; line-height: 1.3; transition: border-radius .6s var(--ease-out), background-color .6s, border-color .6s; }
.b1 { --x: 6%; --rot: -3deg; --i: 0; }
.b2 { --x: 34%; --rot: 4deg; --i: 1; }
.b3 { --x: 0%; --rot: 2.5deg; --i: 2; }
.b4 { --x: 26%; --rot: -4.5deg; --i: 3; }
.mess-stage.is-tidy .bubble { --x: 0px; --rot: 0deg; max-width: 100%; justify-self: stretch; }
.mess-stage.is-tidy .bubble span { border-radius: .8rem; background: var(--asfalto); border-color: #ff6b0055; }
.mess-after { margin-top: 1.75rem; display: grid; grid-template-columns: 1.4rem 1fr; gap: .6rem; align-items: start; font-size: 1.125rem; line-height: 1.5; }
.mess-after svg { width: 1.4rem; height: 1.4rem; margin-top: .15rem; }

/* Passos: a ordem é real, por isso a numeração */
.step-list { margin: 2.5rem 0 2.25rem; display: grid; gap: 0; position: relative; }
.step { position: relative; display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; padding-bottom: 2rem; }
.step:last-child { padding-bottom: 0; }
.step::before { content: ''; position: absolute; left: 1.5rem; top: 3rem; bottom: 0; width: 2px; margin-left: -1px; background: var(--linha); }
.step::after { content: ''; position: absolute; left: 1.5rem; top: 3rem; bottom: 0; width: 2px; margin-left: -1px; background: var(--farol); transform-origin: top; transform: scaleY(0); transition: transform .9s var(--ease-out) .25s; }
.step:last-child::before, .step:last-child::after { display: none; }
.step-n { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; border: 2px solid var(--linha); background: var(--asfalto); font-weight: 600; font-size: 1.2rem; color: var(--cinza); transition: border-color .5s, color .5s, background-color .5s, transform .6s var(--ease-spring); }
.step h3 { padding-top: .6rem; }
.step p { margin-top: .5rem; color: var(--cinza); font-size: 1.0625rem; line-height: 1.6; }
.step > div { opacity: .45; transform: translateX(10px); transition: opacity .6s, transform .7s var(--ease-out); }
.step.is-on .step-n { border-color: var(--farol); background: var(--farol); color: var(--asfalto); transform: scale(1.06); }
.step.is-on > div { opacity: 1; transform: none; }
.step.is-on::after { transform: scaleY(1); }

/* Recursos: trilho para arrastar */
.rail { margin-top: 2rem; display: flex; gap: .85rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad); padding: .25rem var(--pad) 1rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.rail::-webkit-scrollbar { display: none; }
.card { flex: 0 0 82%; max-width: 22rem; scroll-snap-align: start; padding: 1.4rem 1.3rem 1.6rem; min-height: 15.5rem; display: flex; flex-direction: column; border-radius: 1.4rem; background: var(--painel); border: 1px solid var(--linha); }
.card:nth-child(3) { background: var(--farol); color: var(--asfalto); border-color: transparent; }
.card-k { font-size: .875rem; font-weight: 500; color: var(--farol); }
.card:nth-child(3) .card-k { color: #3a1c05; }
.card h3 { margin-top: auto; padding-top: 2.5rem; font-size: 1.6rem; letter-spacing: -.035em; line-height: 1.08; }
.card p:last-child { margin-top: .7rem; font-size: 1rem; line-height: 1.5; color: var(--cinza); }
.card:nth-child(3) p:last-child { color: #2b1505; }
.rail-dots { display: flex; justify-content: center; gap: .4rem; margin-top: .35rem; }
.rail-dots i { width: .4rem; height: .4rem; border-radius: 999px; background: var(--linha); transition: width .35s var(--ease-out), background-color .35s; }
.rail-dots i.is-on { width: 1.4rem; background: var(--farol); }

/* Fatos + perguntas */
.facts { margin-top: 2.25rem; display: grid; }
.facts li { display: grid; gap: .3rem; padding: 1.2rem 0; border-top: 1px solid var(--linha); }
.facts b { font-size: 1.9rem; font-weight: 600; letter-spacing: -.04em; line-height: 1.05; }
.facts span { color: var(--cinza); font-size: 1.0625rem; line-height: 1.5; }
.faq { margin-top: 2.5rem; border-radius: 1.4rem; background: var(--painel); border: 1px solid var(--linha); padding: .3rem 1.2rem; }
details + details { border-top: 1px solid var(--linha); }
summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; padding-block: .9rem; cursor: pointer; list-style: none; font-size: 1.0625rem; font-weight: 500; line-height: 1.3; -webkit-user-select: none; user-select: none; }
summary::-webkit-details-marker { display: none; }
.plus { position: relative; flex: none; width: 1.1rem; height: 1.1rem; }
.plus::before, .plus::after { content: ''; position: absolute; inset: 50% 0 auto; height: 2px; margin-top: -1px; border-radius: 2px; background: var(--farol); transition: transform .35s var(--ease-out); }
.plus::after { transform: rotate(90deg); }
details[open] .plus::after { transform: rotate(0); }
details p { padding: 0 1.5rem 1.2rem 0; color: var(--cinza); font-size: 1rem; line-height: 1.6; }
details[open] p { animation: rise .45s var(--ease-out); }

/* CTA final */
.final { position: relative; overflow: clip; padding-block: 4.5rem; background: var(--farol); color: var(--asfalto); }
.final h2 { font-size: clamp(2.6rem, 12vw, 5rem); }
.final h2 em { color: #3a1c05; }
.final-actions { margin-top: 2.25rem; display: grid; gap: .75rem; max-width: 24rem; position: relative; z-index: 1; }
.final-note { margin-top: 1.25rem; font-size: .9375rem; line-height: 1.5; position: relative; z-index: 1; }
.final-mark { position: absolute; right: -7rem; bottom: -5rem; width: 22rem; height: 22rem; opacity: .16; }
.final-mark path { stroke: var(--asfalto); }

/* Rodapé */
.foot { padding: 2rem 0 calc(6.5rem + env(safe-area-inset-bottom)); }
.foot .wrap { display: grid; gap: 1rem; }
.foot-phone { display: inline-flex; align-items: center; min-height: 44px; font-size: 1.0625rem; font-weight: 500; }
.foot-legal { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; padding-top: 1rem; border-top: 1px solid var(--linha); color: var(--cinza); font-size: .9375rem; }
.foot-legal a, .foot-legal span { display: inline-flex; align-items: center; min-height: 44px; }

/* Barra fixa */
.dock { position: fixed; z-index: 40; left: .75rem; right: .75rem; bottom: calc(.75rem + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .5rem .5rem .5rem 1.15rem; border-radius: 999px; background: color-mix(in srgb, var(--painel-2) 88%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid var(--linha); box-shadow: 0 18px 40px -12px #000; transform: translateY(140%); transition: transform .55s var(--ease-out); }
.dock[hidden] { display: flex; visibility: hidden; }
.dock.is-up { transform: none; }
.dock > span { font-size: .9375rem; font-weight: 500; }
.dock .btn { min-height: 46px; padding-inline: 1.15rem; font-size: 1rem; }

/* Revelação ao rolar */
.reveal { transition: opacity .7s var(--ease-out), transform .8s var(--ease-out); }
.reveal.is-pending { opacity: 0; transform: translateY(22px); }

/* Telas maiores: a página continua a mesma, só respira mais */
@media (min-width: 900px) {
  :root { --pad: 2.5rem; }
  .hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 4rem; padding-block: 4rem 6rem; }
  h1 { font-size: clamp(5rem, 8.2vw, 7.4rem); }
  .hero-actions .btn { width: auto; }
  .mess, .steps, .plain, .feats, .final { padding-block: 7rem; }
  .mess .wrap, .steps .wrap, .plain .wrap { max-width: 46rem; }
  .feats .wrap { max-width: 68rem; }
  .rail { max-width: 68rem; margin-inline: auto; padding-inline: var(--pad); }
  .card { flex-basis: 20rem; }
  .facts { grid-template-columns: 1fr 1fr; column-gap: 3rem; }
  .dock { left: auto; right: 1.5rem; width: 21rem; }
  .foot { padding-bottom: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal.is-pending { opacity: 1; transform: none; }
  .step > div { opacity: 1; transform: none; }
}

/* Escalonamento das animações. Eram estilos dentro do HTML (style="--d:1"), que a política de segurança do servidor bloqueia (style-src 'self'). */
[data-d="0"] { --d: 0; }
[data-d="1"] { --d: 1; }
[data-d="2"] { --d: 2; }
[data-d="3"] { --d: 3; }
[data-d="4"] { --d: 4; }
[data-d="5"] { --d: 5; }
[data-r="0"] { --r: 0; }
[data-r="1"] { --r: 1; }
[data-r="2"] { --r: 2; }
