/* ================================
   JORNADA APP — LOGIN "A TRILHA" (index.html)
   Mapa em noite azul: o caminho se desenha uma vez e cada etapa acende.
   O botão e o campo aparecem na hora; a animação nunca fica na frente de quem quer entrar.
================================ */
:root {
  color-scheme: dark;
  --ouro: #ECA815; --ouro-c: #E8C97A; --creme: #F3E9D2; --mudo: #a9bccb;
  --azul: #5BC8E8; --azul-c: #A8DCF0; --azul-fundo: #0F2332; --linha: #23435a;
  --ease: cubic-bezier(.4, 0, .2, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: #08131c; color: var(--creme); font: 15px/1.5 'Nunito', system-ui, sans-serif; }
.lg { position: relative; min-height: 100vh; min-height: 100dvh; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; padding: calc(18px + env(safe-area-inset-top, 0px)) 20px calc(18px + env(safe-area-inset-bottom, 0px)); }
.lg-fundo { position: fixed; inset: 0; z-index: -1; background: radial-gradient(110% 60% at 50% 25%, #183a52 0%, var(--azul-fundo) 45%, #08131c 100%); }
.lg-fundo::before { content: ""; position: absolute; inset: 0; opacity: .55; background-image: radial-gradient(1px 1px at 12% 18%, var(--azul-c) 60%, transparent 61%), radial-gradient(1px 1px at 78% 12%, var(--azul-c) 60%, transparent 61%), radial-gradient(1.5px 1.5px at 64% 34%, var(--azul-c) 60%, transparent 61%), radial-gradient(1px 1px at 30% 44%, var(--azul-c) 60%, transparent 61%), radial-gradient(1px 1px at 88% 52%, var(--azul-c) 60%, transparent 61%), radial-gradient(1.5px 1.5px at 20% 8%, var(--azul-c) 60%, transparent 61%), radial-gradient(1px 1px at 52% 6%, var(--azul-c) 60%, transparent 61%); }
.lg-marca { margin: 65px 0 0; text-align: center; font: 700 min(45px, 12.2vw)/1.08 'Cinzel', Georgia, serif; letter-spacing: .02em; text-transform: uppercase; color: var(--ouro-c); }

.lg-arte { flex: 1 1 auto; display: grid; place-items: center; min-height: 190px; padding: 46px 0 6px; }
.trilha { display: block; width: auto; height: min(36vh, 290px); min-height: 180px; max-width: 100%; overflow: visible; }
.guia { fill: none; stroke: var(--azul-c); stroke-opacity: .3; stroke-width: 1.5; stroke-dasharray: 2 6; }
.caminho { fill: none; stroke: var(--azul); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.no { transform-box: fill-box; transform-origin: 50% 50%; }
.no circle { fill: var(--azul-fundo); stroke: var(--azul); stroke-width: 2; }
.no.fim circle.anel { fill: #2a1d07; stroke: var(--ouro); stroke-width: 2.4; }
.no.fim circle.halo { fill: url(#haloB); stroke: none; }
.rot { font: 700 10px 'Nunito', sans-serif; letter-spacing: .12em; fill: var(--azul-c); text-transform: uppercase; }
.no.fim .rot { fill: var(--ouro-c); }
.ic { fill: none; stroke: var(--azul-c); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.no.fim .ic { stroke: var(--ouro); }

.lg-texto h1 { margin: 0; text-align: center; font: 600 34px/1.08 'Cormorant Garamond', serif; color: var(--creme); }
.lg-texto p { margin: 4px 0 14px; text-align: center; font-size: 14.5px; color: var(--mudo); }

.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 50px; border: 0; border-radius: 14px; background: #fff; color: #1f1f1f; font: 700 15.5px 'Nunito', sans-serif; cursor: pointer; }
.btn-google:active, .lg-form button:active { transform: scale(.98); }
.lg-ou { display: flex; align-items: center; gap: 8px; margin: 11px 0; font-size: 12.5px; color: var(--mudo); }
.lg-ou::before, .lg-ou::after { content: ""; flex: 1; height: 1px; background: var(--linha); }
.lg-form { display: flex; flex-wrap: wrap; gap: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* 16px: o iPhone não dá zoom ao tocar no campo */
.lg-form input { flex: 1 1 170px; min-width: 0; min-height: 50px; font: 16px 'Nunito', sans-serif; color: var(--creme); background: rgba(15, 35, 50, .7); border: 1px solid var(--linha); border-radius: 14px; padding: 0 14px; }
.lg-form input::placeholder { color: #7d93a3; }
.lg-form button { flex: 0 1 auto; min-height: 50px; border: 0; border-radius: 14px; padding: 0 16px; background: var(--azul); color: var(--azul-fundo); font: 800 14.5px 'Nunito', sans-serif; cursor: pointer; white-space: nowrap; }
.lg-form button:disabled { opacity: .6; }
.btn-google:focus-visible, .lg-form button:focus-visible, .lg-form input:focus-visible, .lg a:focus-visible { outline: 2px solid var(--azul-c); outline-offset: 2px; }
.login-msg { margin: 10px 0 0; padding: 10px 12px; font-size: 13.5px; color: var(--azul-c); background: rgba(15, 35, 50, .8); border: 1px solid #50A0C8; border-radius: 12px; }
.login-msg[hidden] { display: none; }
.login-msg.erro { color: #ffc2b6; border-color: #E26D5C; }
.login-nota { margin: 10px 0 0; text-align: center; font-size: 11.5px; line-height: 1.45; color: var(--mudo); }
.login-nota a { color: var(--ouro-c); }

/* tela baixa: o título grande não pode empurrar o botão de entrar para fora */
@media (max-height: 720px) {
  .lg-marca { margin-top: 45px; font-size: min(38px, 10.5vw); }
  .lg-arte { min-height: 150px; padding: 20px 0 0; }
  .trilha { height: 24vh; min-height: 140px; }
  .lg-texto h1 { font-size: 29px; }
}

@media (prefers-reduced-motion: no-preference) {
  .caminho { animation: lg-desenha 1.6s var(--ease) .1s both; }
  .no { animation: lg-acende .45s var(--ease) both; animation-delay: var(--d); }
  .lg-texto h1 { animation: lg-sobe .6s var(--ease) .15s both; }
  .lg-texto p { animation: lg-sobe .6s var(--ease) .25s both; }
}
@keyframes lg-desenha { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes lg-acende { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: none; } }
@keyframes lg-sobe { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
