/* ================= Ecrã de escolha · Estrada =================
   Logótipo, pergunta, estrada com os veículos da opção em foco, dois botões e faixa de factos. */
.gate .ga { display: block; transition: transform .7s cubic-bezier(.2,.7,.2,1), opacity .5s; }
.gate .ga .veh-svg { width: 100%; height: auto; display: block; }
.gate h1 { text-wrap: balance; }
.gate-lang { position: absolute; top: calc(22px + env(safe-area-inset-top, 0px)); right: 24px; z-index: 6; }
@keyframes brandIn { from { opacity: 0; transform: translateY(-14px) scale(.96); } to { opacity: 1; transform: none; } }

/* cabeçalho: logótipo grande e pergunta (103px entre os dois em desktop) */
.gate--b .gate-inner { gap: 24px; }
.gr-head { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.gb-logo { display: block; margin-block: 12px 14px; }
.gb-logo svg { display: block; height: clamp(84px, 9vw, 124px); width: auto; }
.gr-head h1 { margin-top: 73px; font-size: clamp(38px, 6vw, 76px); font-stretch: 125%; font-weight: 900; }

/* estrada */
.gr-road { position: relative; height: clamp(150px, 22vh, 240px); margin-top: clamp(16px, 4vh, 40px); overflow: hidden; }
.gr-road::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 44px; background: linear-gradient(180deg, #17191e, #0d0e11); border-top: 1px solid var(--line); }
.gr-lane { position: absolute; left: 0; right: 0; bottom: 20px; height: 3px; background-image: linear-gradient(90deg, rgba(255,255,255,.35) 50%, transparent 50%); background-size: 88px 3px; background-repeat: repeat-x; animation: lane 1.1s linear infinite; }
/* as marcas correm para a direita: os veículos (virados para a esquerda) avançam */
@keyframes lane { from { background-position: 0 0; } to { background-position: 88px 0; } }
@keyframes grEnter { from { transform: translateX(110%); } to { transform: none; } }

/* veículos: lado a lado, à mesma escala, rodas na mesma linha (as ilustrações terminam na linha das rodas + 4px de sombra) */
.gr-group { position: absolute; left: 0; right: 0; bottom: 26px; height: 100%; z-index: 1; display: flex; justify-content: center; align-items: flex-end; gap: clamp(28px, 4vw, 72px);
  transform: translateX(-115%); transition: transform .9s cubic-bezier(.65,0,.35,1); }
.gr-road[data-show="ligeiros"] .gr-ligeiros, .gr-road[data-show="pesados"] .gr-pesados { transform: none; animation: grEnter 1s cubic-bezier(.2,.75,.2,1) both; }
.gr-group .ga { position: relative; inset: auto; margin: 0; opacity: 1; transform: translateY(2.3%); }
.gate.play .gr-group .ga { animation: none; }
.gr-group .ga-1 { order: -1; }
/* largura proporcional à largura do desenho (400 para ligeiros/máquinas, 720 para o articulado) */
.gr-ligeiros .ga-0, .gr-ligeiros .ga-1 { width: min(27%, 380px); }
.gr-pesados .ga-0.ga-artic { width: min(46%, 640px); }
.gr-pesados .ga-1 { width: min(25.6%, 356px); }

/* botões */
.gr-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.gr-btn { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 28px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); background-clip: padding-box; color: var(--fg); text-align: left; transition: border-color .3s, background .3s, box-shadow .3s; }
.gr-btn:hover { border-color: #4a505c; }
.gr-btn.on { border-color: var(--red); background: linear-gradient(180deg, rgba(227,6,19,.12), var(--surface)); box-shadow: inset 0 0 0 1px var(--red), 0 0 24px rgba(227,6,19,.18); }
.gr-btn-pesados.on { border-color: var(--blue-soft); background: linear-gradient(180deg, rgba(44,79,174,.2), var(--surface)); box-shadow: inset 0 0 0 1px var(--blue-soft), 0 0 24px rgba(143,163,220,.15); }
.gr-txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gr-h { font: 900 clamp(26px, 3vw, 42px)/1 var(--f-display); font-stretch: 120%; }
.gr-d { color: var(--muted); font-size: 14px; }
.gr-arrow { flex-shrink: 0; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; transition: transform .25s; }
.gr-btn-pesados .gr-arrow { background: var(--fg); color: var(--bg); }
.gr-btn:hover .gr-arrow { transform: translateX(5px); }

/* faixa de factos */
.gb-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; color: var(--muted); font-size: 13px; }
.gb-facts li { display: flex; align-items: center; gap: 9px; }
.gb-facts li::before { content: ''; width: 8px; height: 8px; flex-shrink: 0; margin-left: 11px; background: var(--blue); box-shadow: -11px 0 0 rgba(44,79,174,.45); }
.gb-facts b { color: var(--fg); font-weight: 700; }

/* entrada */
.gate--b.play .gb-logo { animation: brandIn .9s cubic-bezier(.2,.7,.2,1) both; }
.gate--b.play .gr-head h1 { animation: rvUp .8s cubic-bezier(.2,.7,.2,1) both; animation-delay: 170ms; }
.gate--b.play .gr-btn { animation: rvUp .8s cubic-bezier(.2,.7,.2,1) backwards; animation-delay: calc(350ms + var(--i) * 120ms); }
.gate--b.play .gb-facts { animation: rvUp .8s cubic-bezier(.2,.7,.2,1) both; animation-delay: 600ms; }

@media (max-width: 760px) {
  .gate-lang { top: calc(16px + env(safe-area-inset-top, 0px)); right: 16px; }
  .gate--b .gate-inner { padding-top: 36px; }
  .gr-head h1 { margin-top: 36px; }
  .gr-road { height: 128px; margin-top: 8px; }
  .gr-group { gap: 12px; }
  .gr-ligeiros .ga-0, .gr-ligeiros .ga-1 { width: 45%; }
  .gr-pesados .ga-0.ga-artic { width: 60%; }
  .gr-pesados .ga-1 { width: 33.3%; }
  .gr-choices { grid-template-columns: minmax(0, 1fr); }
  .gr-btn { padding: 18px 20px; }
}
