/* STOP AND SEARCH — the way in: the main menu (index.html) and the loading screen over the online city
 * (concept.html?mode=online, js/entry.js). One key art, the drawn lockup, condensed type, amber for what you can do,
 * teal for what is live. Shared by both pages so the hand-over from menu to loading screen is one picture. */
:root {
  --bone: #ece3d0; --bone-dim: rgba(236, 227, 208, .62); --bone-faint: rgba(236, 227, 208, .4);
  --amber: #e6a13a; --amber-hot: #ffcf7a; --teal: #39d9cc; --alert: #ff6a5a; --ink: #0a0b0c;
  --display: "DIN Condensed", "Bahnschrift SemiCondensed", "Bahnschrift", "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --text: "Avenir Next Condensed", "Avenir Next", "Bahnschrift", "Roboto Condensed", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}

/* ------------------------------------------------------------------ the key art (both pages) */
.entry-art {
  position: absolute; inset: 0; overflow: hidden; background: #120d09 center / cover no-repeat;
}
.entry-art img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 38% 32%;
  transform-origin: 34% 30%; opacity: 0; transition: opacity .6s ease;
  animation: entry-drift 46s ease-in-out infinite alternate;
}
.entry-art img.loaded { opacity: 1; }
@keyframes entry-drift { from { transform: scale(1.04); } to { transform: scale(1.11) translate(-1.2%, .6%); } }

/* ------------------------------------------------------------------ the loading screen */
.entry-loader {
  position: fixed; inset: 0; z-index: 40; overflow: hidden; background: var(--ink); color: var(--bone);
  font: 500 15px/1.4 var(--text); -webkit-font-smoothing: antialiased; user-select: none;
}
.entry-loader .entry-art img { object-position: 34% 30%; }
.ld-arts { position: absolute; inset: 0; }
.ld-arts .entry-art { opacity: 0; transition: opacity 1.6s ease; }
.ld-arts .entry-art.on { opacity: 1; }
.ld-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(0deg, rgba(6, 6, 7, .92) 0, rgba(6, 6, 7, .62) 17%, rgba(6, 6, 7, 0) 42%),
    linear-gradient(180deg, rgba(6, 6, 7, .28), rgba(6, 6, 7, 0) 18%),
    radial-gradient(140% 120% at 40% 35%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .45));
}
.ld-foot {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 32px;
  padding: 0 clamp(22px, 4.2vw, 64px) clamp(22px, 5vh, 48px);
}
.ld-brand { min-width: 0; }
.ld-brand .ld-mark { display: block; width: clamp(170px, 15vw, 250px); line-height: 0; filter: drop-shadow(0 6px 22px rgba(0, 0, 0, .7)); }
.ld-brand .ld-mark svg { width: 100%; height: auto; overflow: visible; }
.ld-tip { display: flex; gap: 14px; align-items: baseline; margin: 20px 0 0; max-width: 62ch; min-height: 2.8em; font-size: clamp(14px, 1.15vw, 17px); color: rgba(236, 227, 208, .86); }
.ld-tip b { flex: none; font: 700 12px/1 var(--display); letter-spacing: .3em; color: var(--amber); padding-top: .2em; }
.ld-tip span { transition: opacity .45s ease, transform .45s var(--ease-out); }
.ld-tip span.out { opacity: 0; transform: translateY(6px); }

.ld-status { flex: none; display: grid; justify-items: end; gap: 12px; text-align: right; }
.ld-row { display: flex; align-items: center; gap: 16px; }
.ld-label { display: block; font: 700 clamp(24px, 2.3vw, 32px)/1 var(--display); letter-spacing: .1em; color: var(--bone); text-shadow: 0 2px 16px rgba(0, 0, 0, .8); }
.ld-detail { display: block; margin-top: 6px; font-size: 13px; letter-spacing: .04em; color: var(--bone-dim); min-height: 1.4em; }
.ld-spin { width: 38px; height: 38px; flex: none; order: 2; }
.ld-spin circle { fill: none; stroke-width: 3; }
.ld-spin .track { stroke: rgba(236, 227, 208, .14); }
.ld-spin .arc { stroke: var(--amber); stroke-linecap: round; stroke-dasharray: 26 200; transform-origin: 50% 50%; animation: ld-spin 1s linear infinite; filter: drop-shadow(0 0 5px rgba(230, 161, 58, .7)); }
@keyframes ld-spin { to { transform: rotate(360deg); } }
.ld-steps { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ld-steps li { width: 26px; height: 3px; background: rgba(236, 227, 208, .16); overflow: hidden; position: relative; }
.ld-steps li::after { content: ""; position: absolute; inset: 0; background: var(--amber); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out); }
.ld-steps li.done::after { transform: scaleX(1); }
.ld-steps li.now::after { transform: scaleX(1); opacity: .5; animation: ld-now 1.1s ease-in-out infinite alternate; }
@keyframes ld-now { from { opacity: .18; } to { opacity: .75; } }
.ld-actions { display: flex; gap: 10px; }
.ld-actions[hidden] { display: none; }
.ld-esc { font: 600 10px/1 var(--text); letter-spacing: .26em; color: var(--bone-faint); }
.ld-esc kbd { font: inherit; padding: 3px 5px; margin-right: 6px; border: 1px solid rgba(236, 227, 208, .3); border-radius: 3px; }

/* states */
.entry-loader[data-state="error"] .arc, .entry-loader[data-state="held"] .arc { stroke: var(--alert); stroke-dasharray: 200 0; animation: none; filter: none; }
.entry-loader[data-state="held"] .arc { stroke: var(--amber); }
.entry-loader[data-state="error"] .ld-label { color: #ffd9cf; }
.entry-loader[data-state="error"] .ld-steps li.now::after { background: var(--alert); animation: none; opacity: .8; }
.entry-loader[data-state="ready"] .arc { stroke: var(--teal); stroke-dasharray: 200 0; animation: none; filter: drop-shadow(0 0 6px rgba(57, 217, 204, .7)); }
.entry-loader[data-state="ready"] .ld-steps li::after { background: var(--teal); }

/* arrival (a deep link or a reload: not handed over by the menu) and departure into the city */
.entry-loader.arrive .ld-arts { animation: ld-in .8s ease both; }
.entry-loader.arrive .ld-foot > * { animation: ld-rise .7s .25s var(--ease-out) both; }
.entry-loader.arrive .ld-status { animation-delay: .35s; }
@keyframes ld-in { from { opacity: 0; } }
@keyframes ld-rise { from { opacity: 0; transform: translateY(18px); } }
.entry-loader.leave { pointer-events: none; animation: ld-out .7s .05s var(--ease-io) forwards; }
.entry-loader.leave .ld-arts { transition: transform .9s var(--ease-io), filter .9s ease; transform: scale(1.14); filter: blur(6px) brightness(.7); }
.entry-loader.leave .ld-foot { transition: transform .5s var(--ease-io), opacity .4s ease; transform: translateY(28px); opacity: 0; }
@keyframes ld-out { to { opacity: 0; visibility: hidden; } }

/* ------------------------------------------------------------------ buttons (loading screen and menu panels) */
.e-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px; border-radius: 2px;
  font: 700 15px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  color: var(--bone); background: rgba(10, 11, 12, .55); border: 1px solid rgba(236, 227, 208, .32);
  transition: background .18s, border-color .18s, color .18s;
}
.e-btn:hover { border-color: var(--bone); }
.e-btn.primary { background: var(--amber); border-color: var(--amber); color: #15100a; }
.e-btn.primary:hover { background: #f2b65a; }
.e-btn:focus-visible { outline: 2px solid var(--amber-hot); outline-offset: 3px; }

/* ------------------------------------------------------------------ narrow and short screens */
@media (max-width: 760px) {
  .ld-foot { flex-direction: column; align-items: stretch; gap: 22px; }
  .ld-status { justify-items: start; text-align: left; }
  .ld-row { flex-direction: row; }
  .ld-spin { order: 0; }
  .ld-tip { font-size: 14px; }
  .ld-esc { display: none; }
  .ld-shade { background: linear-gradient(0deg, rgba(6, 6, 7, .95) 0, rgba(6, 6, 7, .7) 30%, rgba(6, 6, 7, 0) 62%), linear-gradient(180deg, rgba(6, 6, 7, .3), rgba(6, 6, 7, 0) 18%); }
}
@media (max-height: 520px) { .ld-tip { display: none; } .ld-brand .ld-mark { width: 150px; } }

@media (prefers-reduced-motion: reduce) {
  .entry-art img { animation: none; transform: scale(1.04); }
  .ld-spin .arc { animation-duration: 3s; }
  .ld-steps li.now::after { animation: none; }
  .entry-loader.arrive .ld-arts, .entry-loader.arrive .ld-foot > * { animation: ld-in .3s ease both; }
  .entry-loader.leave { animation-duration: .3s; }
  .entry-loader.leave .ld-arts, .entry-loader.leave .ld-foot { transform: none; filter: none; }
  .ld-arts .entry-art { transition-duration: .4s; }
}
html.entry #boot-msg { display: none; }
