/*
 * Tela "abra no celular" (gate.js). Só aparece no computador; no celular o
 * #lince-gate é removido antes de o Flutter subir.
 *
 * Cores da paleta do app (lib/presentation/theme/tokens/palette.dart):
 * lince 50/100/200/600/700/800/950 e neutral 50/600/900. Fontes: as mesmas
 * Inter e Bricolage Grotesque que o app empacota, servidas do próprio build
 * (assets/assets/fonts/) — nada de fonte remota, o CSP não deixaria.
 */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("assets/assets/fonts/BricolageGrotesque_24pt-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("assets/assets/fonts/BricolageGrotesque_24pt-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/assets/fonts/Inter-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/assets/fonts/Inter-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
}

.gate {
  --fundo: #f1ecf8;
  --fundo-2: #ddd0ee;
  --texto: #211d28;
  --suave: #5e576a;
  --marca: #6f4b99;
  --marca-forte: #5a3d7e;
  --linha: rgba(111, 75, 153, 0.18);
  --cartao: #ffffff;
  --sombra: 0 30px 80px -30px rgba(52, 35, 72, 0.45);

  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: clamp(24px, 5vw, 64px);
  box-sizing: border-box;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 85% -10%, var(--fundo-2), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, var(--fundo-2), transparent 55%),
    var(--fundo);
  color: var(--texto);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
  .gate {
    --fundo: #1f1529;
    --fundo-2: #473163;
    --texto: #f1ecf8;
    --suave: #bca2dc;
    --marca: #bca2dc;
    --marca-forte: #ddd0ee;
    --linha: rgba(188, 162, 220, 0.22);
    --sombra: 0 30px 90px -30px rgba(0, 0, 0, 0.7);
  }
}

/* O lince, grande e quase transparente, ao fundo. Decorativo. */
.gate::before {
  content: "";
  position: absolute;
  right: -6vw;
  bottom: -14vh;
  width: min(62vw, 720px);
  aspect-ratio: 1;
  background: var(--marca);
  -webkit-mask: url("icons/Icon-512.png") center / contain no-repeat;
  mask: url("icons/Icon-512.png") center / contain no-repeat;
  opacity: 0.07;
  pointer-events: none;
}

.gate__conteudo {
  position: relative;
  width: 100%;
  max-width: 1040px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  animation: gate-entra 600ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@media (max-width: 760px) {
  .gate__conteudo {
    grid-template-columns: 1fr;
  }
}

.gate__logo {
  display: block;
  margin-bottom: 40px;
  width: 132px;
  aspect-ratio: 195 / 53;
  background: var(--marca);
  -webkit-mask: url("assets/assets/images/logo.svg") left center / contain no-repeat;
  mask: url("assets/assets/images/logo.svg") left center / contain no-repeat;
}

.gate h1 {
  margin: 0 0 18px;
  font-family: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.gate h1 em {
  font-style: normal;
  color: var(--marca);
}

.gate__texto {
  max-width: 34em;
  margin: 0 0 28px;
  color: var(--suave);
  font-size: 17px;
}

.gate__passos {
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  counter-reset: passo;
}

.gate__passos li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  counter-increment: passo;
}

.gate__passos li::before {
  content: counter(passo);
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--marca);
  color: var(--fundo);
  font-family: "Bricolage Grotesque", "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
  transform: translateY(-1px);
}

.gate__ajuda {
  color: var(--marca);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--linha);
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
  transition: text-decoration-color 160ms ease;
}

.gate__ajuda:hover {
  text-decoration-color: currentColor;
}

.gate__ajuda:focus-visible {
  outline: 3px solid var(--marca);
  outline-offset: 4px;
  border-radius: 4px;
}

.gate__cartao {
  margin: 0;
  justify-self: center;
  width: min(100%, 360px);
  padding: 28px 28px 22px;
  box-sizing: border-box;
  border-radius: 28px;
  background: var(--cartao);
  color: #211d28;
  box-shadow: var(--sombra);
  text-align: center;
}

.gate__qr {
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
}

.gate__qr svg {
  display: block;
  width: 100%;
  height: 100%;
}

.gate__cartao figcaption {
  margin-top: 16px;
  font-size: 14px;
  color: #5e576a;
}

.gate__endereco {
  display: block;
  margin-top: 4px;
  font-family: "Bricolage Grotesque", "Inter", sans-serif;
  font-weight: 600;
  font-size: 17px;
  color: #5a3d7e;
  word-break: break-all;
}

@keyframes gate-entra {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gate__conteudo {
    animation: none;
  }
  .gate__ajuda {
    transition: none;
  }
}
