@font-face {
  font-family: Archivo;
  src: url("assets/archivo.woff2") format("woff2");
  font-weight: 400 600;
  font-stretch: 100% 125%;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #eef4fc;
  --ink-2: #a9bbd1;
  --sky: #0b1a2c;
  --night: #040a14;
  --line: rgb(169 187 209 / .32);
  --gutter: max(clamp(24px, 5.2vw, 80px), env(safe-area-inset-left), env(safe-area-inset-right));
  --page: 1360px;
  --edge: max(var(--gutter), calc((100vw - var(--page)) / 2));
  --slant: 10deg;
}

* { box-sizing: border-box; }

html {
  background: var(--sky);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 2px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 40;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--night);
  border-radius: 6px;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* Plakát je první obraz stránky a zároveň stav bez JS, bez WebGL2 a s omezeným pohybem. */
.stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 460px;
  overflow: hidden;
  background: var(--sky);
}

.poster, .poster img, #scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.poster img { object-fit: cover; object-position: 50% 100%; }

#scene { opacity: 0; transition: opacity .5s ease; }

.live .stage { position: fixed; inset: 0 0 auto; height: 100lvh; min-height: 0; }
.ready #scene { opacity: 1; }
.lost #scene { opacity: 0; }

/* Záznam pohybu existuje jen tam, kde běží scéna. */
.journey { display: none; }
.live .journey { display: block; height: 430svh; }

.bar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--edge);
}

.wordmark {
  display: block;
  width: 104px;
  padding-block: 9px;
  color: var(--ink);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s;
}
.wordmark img { display: block; width: 100%; height: auto; }
.past-crest .wordmark, body:not(.live) .wordmark { opacity: 1; visibility: visible; }

.nav { display: flex; align-items: center; gap: 8px; margin-right: -10px; font-size: 16px; font-weight: 500; font-stretch: 108%; }
.nav a, .nav button {
  min-height: 44px;
  min-width: 44px;
  padding: 0 10px;
  display: inline-grid;
  place-items: center;
  transition: opacity .15s ease;
}
.nav a:hover, .nav button:hover { opacity: .68; }
.nav a:active, .nav button:active { opacity: .5; }

.clock {
  display: none;
  margin: 0;
  position: fixed;
  z-index: 25;
  left: var(--edge);
  top: 16px;
  min-height: 44px;
  align-items: center;
  pointer-events: none;
  font-size: 16px;
  font-weight: 500;
  font-stretch: 108%;
  font-variant-numeric: tabular-nums;
  transition: opacity .25s ease;
}
.clock time { margin-left: .35em; color: var(--ink); }
.clock span { color: var(--ink-2); }
.live .clock { display: flex; }
.clock.gone { opacity: 0; }

.contact {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: clamp(48px, 9vh, 96px);
  background: var(--night);
}

.live .contact {
  min-height: 100svh;
  padding-top: 0;
  background: linear-gradient(to bottom, transparent 30%, rgb(4 10 20 / .72) 62%, rgb(4 10 20 / .9) 100%);
}

/* Bez živé scény plakát měkce přejde do tmavého bloku s údaji. */
body:not(.live) .stage::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 22%;
  background: linear-gradient(to bottom, transparent, var(--night));
}

.contact-inner {
  padding: 0 var(--edge);
  display: grid;
  grid-template-columns: max-content auto max-content;
  justify-content: space-between;
  align-items: last baseline;
  gap: clamp(24px, 3vw, 56px);
}

.mail {
  display: inline-block;
  margin-left: -.06em;
  font-size: clamp(28px, 5.1vw, 96px);
  line-height: 1.06;
  font-weight: 500;
  font-stretch: 112%;
  letter-spacing: -.012em;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
  padding-bottom: .08em;
  transition: background-size .28s ease;
}
.mail:hover { background-size: 100% 1.5px; }

.slant {
  width: 1px;
  height: 104px;
  background: var(--line);
  transform: skewX(calc(-1 * var(--slant)));
  align-self: end;
}

.stamp {
  font-style: normal;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  display: grid;
}
.stamp strong { color: var(--ink); font-weight: 500; }

.foot {
  padding: clamp(40px, 7vh, 72px) var(--edge) max(20px, env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  align-items: center;
  font-size: 14px;
  color: var(--ink-2);
}
.foot a {
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  transition: color .15s ease;
}
.foot a:hover { color: var(--ink); }
.credit { margin-left: auto; }

@media (max-width: 1100px) {
  .contact-inner { grid-template-columns: 1fr; justify-content: stretch; gap: 24px; }
  .slant { display: none; }
  .mail { font-size: min(calc((100vw - 2 * var(--gutter)) / 10.9), 64px); }
}

@media (max-width: 360px) {
  .foot { column-gap: 16px; }
  .credit { margin-left: 0; }
}

@media (max-height: 480px) and (min-width: 700px) {
  .contact-inner { grid-template-columns: max-content auto max-content; justify-content: space-between; }
  .slant { display: block; height: 72px; }
  .mail { font-size: min(5.1vw, 44px); }
  .foot { padding-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
