/* Grau web shell. Colors are the mark's: asfalto, cal, neon (the ring's pink, used sparingly), plus the strip's yellow. */
:root {
  --asfalto: #0F1014;
  --asfalto-2: #171921;
  --cal: #F7F6F2;
  --cal-dim: #B9B8B2;
  --neon: #FF2D87;
  --faixa: #FFD21F;
  --erro: #FF6B6B;
  --gutter: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--asfalto); color: var(--cal); }
body {
  font: 16px/1.45 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh; min-height: 100dvh;
  background:
    radial-gradient(900px 500px at 105% -10%, rgba(255, 45, 135, .16), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(255, 210, 31, .07), transparent 60%),
    var(--asfalto);
  -webkit-font-smoothing: antialiased;
}
main.card {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 28px var(--gutter); text-align: center;
  padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right));
}
.marca { width: min(62vw, 340px); height: auto; display: block; filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .5)); }
h1 {
  margin: 0; font-size: clamp(22px, 4.6vw, 34px); font-weight: 900; letter-spacing: .02em; text-transform: uppercase; line-height: 1.1;
}
p { margin: 0; max-width: 34em; color: var(--cal-dim); }
p.lead { color: var(--cal); font-size: 1.05em; }
.tag { color: var(--cal-dim); font-size: .8rem; letter-spacing: .22em; text-transform: uppercase; }
/* the lane marking: a dashed yellow line like the one down the middle of a street */
.faixa { width: min(70vw, 360px); height: 4px; border: 0; margin: 2px 0; background: repeating-linear-gradient(90deg, var(--faixa) 0 26px, transparent 26px 44px); opacity: .9; }
.btn {
  appearance: none; border: 0; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 12px;
  font: inherit; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; font-size: 1rem;
  color: var(--asfalto); background: var(--cal);
  box-shadow: 0 0 0 2px var(--cal), 6px 6px 0 var(--neon);
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 0 0 0 2px var(--cal), 8px 8px 0 var(--neon); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 2px var(--cal), 2px 2px 0 var(--neon); }
.btn:focus-visible { outline: 3px solid var(--faixa); outline-offset: 4px; }
.btn[disabled] { opacity: .55; cursor: default; transform: none; }
.btn.ghost { background: transparent; color: var(--cal); box-shadow: 0 0 0 2px var(--cal-dim); }
.btn.danger { background: var(--erro); box-shadow: 0 0 0 2px var(--erro), 6px 6px 0 #5a1d1d; }
.g { width: 22px; height: 22px; flex: none; }
.row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
#msg, .msg { min-height: 1.45em; color: var(--cal); }
#msg[data-bad="1"], .msg[data-bad="1"] { color: var(--erro); }
ul.works { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; text-align: left; max-width: 34em; color: var(--cal-dim); }
ul.works li { padding-left: 22px; position: relative; }
ul.works li::before { content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 4px; background: var(--faixa); }
.quem { color: var(--cal-dim); font-size: .9rem; }
[hidden] { display: none !important; }
a { color: var(--cal); }
/* the app's store on a phone or tablet (src/app_loja.js): a plate with the lane marking along its top edge */
.loja-app {
  position: relative; display: grid; justify-items: center; gap: 12px;
  width: min(100%, 420px); padding: 22px 18px 18px; margin-top: 6px;
  background: var(--asfalto-2); border-radius: 14px; box-shadow: inset 0 0 0 1px #2a2d38;
}
.loja-app::before {
  content: ""; position: absolute; left: 18px; right: 18px; top: 0; height: 4px;
  background: repeating-linear-gradient(90deg, var(--faixa) 0 26px, transparent 26px 44px);
}
.loja-app p { color: var(--cal); }
.btn.loja { background: var(--faixa); box-shadow: 0 0 0 2px var(--faixa), 6px 6px 0 var(--neon); }
.btn.loja:hover { box-shadow: 0 0 0 2px var(--faixa), 8px 8px 0 var(--neon); }
.btn.loja:active { box-shadow: 0 0 0 2px var(--faixa), 2px 2px 0 var(--neon); }
.btn.loja:focus-visible { outline-color: var(--cal); }
@media (max-height: 520px) {
  main.card { flex-direction: row; flex-wrap: wrap; gap: 14px 28px; padding: 12px var(--gutter); }
  .marca { width: min(26vw, 190px); }
  .faixa { display: none; }
  main.card > p.lead { max-width: 22em; }
  .loja-app { grid-auto-flow: column; align-items: center; gap: 16px; width: auto; padding: 16px 16px 12px; margin-top: 0; }
  .btn.loja { min-height: 44px; padding: 0 20px; }
}

/* ---- the game page ---- */
body.jogo { overflow: hidden; background: #000; overscroll-behavior: none; }
#canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; touch-action: none; outline: none; background: #000; }
.layer { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px var(--gutter); text-align: center; background: var(--asfalto); transition: opacity .35s ease; z-index: 10; }
.layer.gone { opacity: 0; pointer-events: none; }
.track { width: min(70vw, 420px); height: 8px; background: var(--asfalto-2); border-radius: 4px; overflow: hidden; box-shadow: inset 0 0 0 1px #2a2d38; }
#bar { height: 100%; width: 100%; transform-origin: left center; transform: scaleX(0); background: linear-gradient(90deg, var(--faixa), #fff3a8); transition: transform .2s linear; }
.pct { color: var(--cal-dim); font-variant-numeric: tabular-nums; font-size: .85rem; letter-spacing: .1em; min-height: 1.2em; }
/* A step nobody can count yet: a short stripe of the road's paint runs along the track (v1s-977-abertura). */
.track.busy #bar { width: 32%; transform: none; transition: none; animation: faixa-corre 1.1s ease-in-out infinite; }
@keyframes faixa-corre { from { transform: translateX(-105%); } to { transform: translateX(320%); } }
@media (prefers-reduced-motion: reduce) {
  .track.busy #bar { width: 100%; animation: faixa-pulsa 1.6s ease-in-out infinite alternate; }
  @keyframes faixa-pulsa { from { opacity: .25; } to { opacity: .7; } }
}
