/* =========================================================
   LARP FOR LIFE — styl
   ========================================================= */

@property --a { syntax: '<number>'; inherits: true; initial-value: 0; }

:root {
  --bg: #030303;
  --ink: #e6e6e6;
  --ink-soft: #bdbdbd;
  --ink-dim: #7c7c7c;
  --ink-faint: #3a3a3a;
  --line: rgba(255, 255, 255, .12);
  --line-strong: rgba(255, 255, 255, .24);

  --f-display: "Archivo", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --f-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.75, 0, .15, 1);

  --noise: none;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #2a2a2a #000;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-display);
  font-stretch: 100%;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-loading { overflow: hidden; }
body.is-locked { overflow: hidden; }

::selection { background: var(--ink); color: #000; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; max-width: 100%; }

:focus-visible { outline: 1px dashed var(--ink); outline-offset: 6px; }

main, .footer { position: relative; z-index: 2; }

@keyframes spin { to { rotate: 360deg; } }

/* ---------- Atmosféra ---------- */

.fog {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.fog.is-fallback {
  background:
    radial-gradient(60vmax 50vmax at 50% 40%, rgba(255,255,255,.06), transparent 70%),
    var(--bg);
}

.grain {
  position: fixed;
  inset: -100%;
  width: 300%;
  height: 300%;
  z-index: 185;
  pointer-events: none;
  background-image: var(--noise);
  opacity: .075;
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  17%  { transform: translate(-4%, -7%); }
  33%  { transform: translate(6%, 3%); }
  50%  { transform: translate(-7%, 5%); }
  67%  { transform: translate(3%, -5%); }
  83%  { transform: translate(-2%, 8%); }
  100% { transform: translate(0, 0); }
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 45%, rgba(0,0,0,.62) 100%);
}

/* ---------- Kurzor ---------- */

.cursor { display: none; }
.has-cursor, .has-cursor * { cursor: none !important; }
.has-cursor .cursor {
  display: block;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 200;
  pointer-events: none;
  mix-blend-mode: difference;
  transition: opacity .3s;
}
.cursor.is-hidden { opacity: 0; }
.cursor.is-hover { mix-blend-mode: normal; }

.cursor-dot, .cursor-ring {
  position: fixed;
  left: 0;
  top: 0;
  border-radius: 50%;
  will-change: transform;
}
.cursor-dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: #fff;
}
.cursor-ring {
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 1px solid #fff;
  display: grid;
  place-items: center;
  transition: width .4s var(--ease-out), height .4s var(--ease-out), margin .4s var(--ease-out), background-color .3s, border-color .3s;
}
.cursor.is-link .cursor-ring {
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
}
.cursor.is-hover .cursor-ring {
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  background: #fff;
  border-color: #fff;
}
.cursor.is-hover .cursor-dot { opacity: 0; }
.cursor-label {
  font: 300 22px/1 var(--f-mono);
  color: #000;
  opacity: 0;
  transform: scale(.4);
  transition: opacity .2s, transform .4s var(--ease-out);
}
.cursor.is-hover .cursor-label { opacity: 1; transform: none; transition-delay: .08s; }

/* ---------- Loader ---------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  background: #000;
  transition: opacity 1s ease, visibility 1s;
}
.loader.is-done { opacity: 0; visibility: hidden; }

.loader-inner {
  display: grid;
  justify-items: center;
  gap: 28px;
}
.loader-logo {
  width: min(42vw, 260px);
  height: auto;
  opacity: 0;
  animation: neonOn 2s linear .15s forwards;
  transition: transform 1.1s var(--ease-io), filter 1.1s ease, opacity .9s ease;
}
.loader.is-leaving .loader-logo {
  transform: scale(1.9);
  filter: blur(14px);
  opacity: 0 !important;
  animation: none;
}
.loader-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font: 400 11px/1 var(--f-mono);
  letter-spacing: .24em;
  color: var(--ink);
  transition: opacity .5s;
}
.loader.is-leaving .loader-meta { opacity: 0; }
.loader-count { min-width: 3.4ch; font-variant-numeric: tabular-nums; }
.loader-line {
  position: relative;
  width: 90px;
  height: 1px;
  background: var(--line);
  overflow: hidden;
}
.loader-line span {
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform-origin: left;
  transform: scaleX(0);
}

@keyframes neonOn {
  0%   { opacity: 0; }
  6%   { opacity: .7; }
  8%   { opacity: 0; }
  14%  { opacity: .45; }
  16%  { opacity: .05; }
  26%  { opacity: 1; }
  28%  { opacity: .25; }
  32%  { opacity: .9; }
  34%  { opacity: .4; }
  44%  { opacity: 1; }
  100% { opacity: 1; }
}

/* ---------- Logo + ukazatel ---------- */

.brand {
  position: fixed;
  top: 14px;
  left: calc(var(--gutter) - 4px);
  z-index: 60;
  display: block;
  width: 50px;
  height: 50px;
  mix-blend-mode: difference;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 1.2s ease, transform 1.2s var(--ease-out);
}
.is-ready .brand { opacity: 1; transform: none; }
.brand img { width: 100%; height: 100%; }
.brand:hover img { animation: flickerQuick .5s linear; }

@keyframes flickerQuick {
  0%, 100% { opacity: 1; }
  10% { opacity: .2; }
  20% { opacity: 1; }
  35% { opacity: .4; }
  45% { opacity: 1; }
}

.rail {
  position: fixed;
  right: calc(var(--gutter) - 4px);
  top: 50%;
  z-index: 60;
  width: 1px;
  height: 110px;
  margin-top: -55px;
  background: var(--line-strong);
  mix-blend-mode: difference;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.is-ready .rail { opacity: 1; }
.rail-fill {
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform-origin: top;
  transform: scaleY(0);
}

/* ---------- Hranaté ikonové tlačítko ---------- */

.icon-btn {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  transition: background-color .35s, color .35s, border-color .35s, transform .5s var(--ease-out);
}
.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: square;
  transition: transform .5s var(--ease-out);
}
/* rohové značky kolem tlačítka po najetí */
.icon-btn::before {
  content: "";
  position: absolute;
  inset: -7px;
  opacity: 0;
  scale: .8;
  pointer-events: none;
  transition: opacity .35s, scale .6s var(--ease-out);
  background:
    linear-gradient(var(--ink), var(--ink)) left top / 9px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) left top / 1px 9px no-repeat,
    linear-gradient(var(--ink), var(--ink)) right top / 9px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) right top / 1px 9px no-repeat,
    linear-gradient(var(--ink), var(--ink)) left bottom / 9px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) left bottom / 1px 9px no-repeat,
    linear-gradient(var(--ink), var(--ink)) right bottom / 9px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) right bottom / 1px 9px no-repeat;
}
.icon-btn:hover,
.icon-btn:focus-visible {
  background: var(--ink);
  border-color: var(--ink);
  color: #050505;
}
.icon-btn:hover::before,
.icon-btn:focus-visible::before { opacity: 1; scale: 1; }
.icon-btn:active { transform: scale(.92); }

/* ---------- Nadpisy sekcí ---------- */

.section-title {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 900;
  font-stretch: 112%;
  font-size: clamp(44px, 10vw, 170px);
  line-height: .9;
  letter-spacing: -.03em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 520px;
  display: grid;
  place-items: center;
  overflow: hidden;
  z-index: 4;
  -webkit-user-select: none;
  user-select: none;
}

.hero-stage {
  width: 100%;
  display: grid;
  place-items: center;
}

.hero-title {
  position: relative;
  margin: 0;
  font-family: var(--f-display);
  font-weight: 900;
  font-stretch: 125%;
  font-size: min(21vh, 19.5vw);
  font-size: min(21svh, 19.5vw);
  line-height: .86;
  letter-spacing: -.015em;
  text-transform: uppercase;
}

.word {
  position: relative;
  display: flex;
  justify-content: center;
}

/* každé písmeno = vlastní 3D scéna; perspective-origin nastavuje JS */
.ch {
  position: relative;
  display: block;
  perspective: 1100px;
}
.ch-intro {
  position: relative;
  display: block;
  transform-style: preserve-3d;
}
.ch.is-in > .ch-intro { animation: chIn 1.5s cubic-bezier(.16, .84, .12, 1) both; }

.ch-inner {
  position: relative;
  display: block;
  transform-style: preserve-3d;
  transform-origin: 0 0;
  will-change: transform;
}
/* po dojetí úvodu drží vrstvy jednu rasterizaci — plynulejší pohyb */
.ch-inner.is-set .ch-layer { will-change: transform, opacity; }

.ch-layer {
  display: block;
  opacity: var(--a);
}
.ch-face {
  position: relative;
  color: var(--ink);
}
.ch-glow {
  position: absolute;
  inset: 0;
  color: transparent;
  text-shadow:
    0 0 .06em rgba(255,255,255,.9),
    0 0 .3em rgba(255,255,255,.42);
  opacity: calc(var(--a) * .55);
  transform: translateZ(-1px);
}
.ch-side {
  position: absolute;
  inset: 0;
  color: hsl(0 0% var(--l));
  transform: translateZ(var(--z));
}

@keyframes chIn {
  0%   { --a: 0;   transform: translate3d(0, .35em, -900px) rotateX(-75deg); }
  7%   { --a: .75; }
  9%   { --a: .05; }
  15%  { --a: .6; }
  17%  { --a: .1; }
  26%  { --a: 1; }
  29%  { --a: .3; }
  36%  { --a: 1; }
  100% { --a: 1;   transform: none; }
}

.hero-ui {
  position: absolute;
  z-index: 2;
  font: 400 10px/1.4 var(--f-mono);
  letter-spacing: .22em;
  color: var(--ink);
  opacity: 0;
  transition: opacity 1.4s ease;
  pointer-events: none;
}
.is-ready .hero-ui { opacity: .75; }
.hero-ui--bl { left: var(--gutter); bottom: 26px; }
.hero-ui--br { right: var(--gutter); bottom: 22px; }
#clock { font-variant-numeric: tabular-nums; }

.scroll-line {
  position: relative;
  display: block;
  width: 1px;
  height: 46px;
  background: var(--line);
  overflow: hidden;
}
.scroll-line span {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 40%;
  background: var(--ink);
  animation: scrollLine 2.2s var(--ease-io) infinite;
}
@keyframes scrollLine {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(260%); }
}

/* měkká světelná vlna po kliknutí */
.shock {
  position: absolute;
  left: 0;
  top: 0;
  width: 64vmax;
  height: 64vmax;
  margin: -32vmax 0 0 -32vmax;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle closest-side, transparent 78%, rgba(255,255,255,.07) 88%, rgba(255,255,255,.18) 95%, rgba(255,255,255,.05) 98.5%, transparent 100%);
  will-change: transform, opacity;
  animation: shock 2.2s cubic-bezier(.16, .8, .3, 1) forwards;
}
@keyframes shock {
  0%   { transform: scale(.04); opacity: 0; }
  15%  { opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}

/* =========================================================
   LARP HLÁŠKY
   ========================================================= */

.sayings {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 520px;
  overflow: hidden;
  perspective: 1100px;
  --saying-ms: 7000ms;
}
.sayings-stage {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}
.saying {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(1180px, calc(100% - 2 * var(--gutter)));
  margin: 0;
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
  text-align: center;
  font-weight: 900;
  font-stretch: 110%;
  font-size: clamp(36px, 6.4vw, 112px);
  line-height: .98;
  letter-spacing: -.025em;
  text-transform: uppercase;
  pointer-events: none;
}
.sw {
  display: inline-block;
  opacity: 0;
  transform: translate3d(0, .55em, -140px) rotateX(-70deg);
  filter: blur(10px);
  transition: opacity 1.1s ease, transform 1.6s var(--ease-out), filter 1.3s ease;
  transition-delay: calc(var(--i) * 80ms);
}
.saying.is-active .sw {
  opacity: 1;
  transform: none;
  filter: blur(0);
}
.saying.is-past .sw {
  opacity: 0;
  transform: translate3d(0, -.45em, 90px) rotateX(45deg);
  filter: blur(12px);
  transition-duration: .8s, 1.1s, .9s;
  transition-delay: calc(var(--i) * 30ms);
}
.sw--em { text-shadow: 0 0 .22em rgba(255,255,255,.5); }
.sw-tail { text-shadow: none; }
.saying.is-active .sw--em { animation: emFlicker 5.5s linear 1.4s infinite; }
@keyframes emFlicker {
  0%, 100% { opacity: 1; }
  3%  { opacity: .25; }
  5%  { opacity: 1; }
  7%  { opacity: .5; }
  9%  { opacity: 1; }
}

.sayings-ticks {
  position: absolute;
  left: 50%;
  bottom: 34px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}
.sayings-ticks[hidden] { display: none; }
.sayings-ticks i {
  position: relative;
  display: block;
  width: 16px;
  height: 1px;
  overflow: hidden;
  background: var(--line-strong);
  transition: width .6s var(--ease-out);
}
.sayings-ticks i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform-origin: left;
  transform: scaleX(0);
}
.sayings-ticks i.is-on { width: 38px; }
.sayings-ticks i.is-on::after { transform: scaleX(1); }
.sayings-ticks i.is-run::after { animation: tickFill var(--saying-ms) linear forwards; }
@keyframes tickFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* =========================================================
   PÁSKY
   ========================================================= */

.tapes {
  position: relative;
  height: clamp(220px, 34vw, 420px);
  overflow: hidden;
  display: grid;
  place-items: center;
  -webkit-user-select: none;
  user-select: none;
}
.tape {
  position: absolute;
  left: -10%;
  width: 120%;
  padding: clamp(10px, 1.3vw, 20px) 0;
  overflow: hidden;
  white-space: nowrap;
}
.tape--a {
  z-index: 2;
  background: var(--ink);
  color: #050505;
  transform: rotate(-4deg);
}
.tape--b {
  background: #050505;
  border-block: 1px solid var(--line-strong);
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.55);
  transform: rotate(3.2deg);
}
.tape-track {
  display: inline-flex;
  will-change: transform;
}
.tape-chunk {
  display: inline-flex;
  align-items: center;
  gap: .42em;
  padding-right: .42em;
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(34px, 6vw, 92px);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -.01em;
}
.tape-sep {
  display: inline-block;
  width: .24em;
  height: .24em;
  background: currentColor;
  transform: rotate(45deg);
}
.tape--b .tape-sep { background: rgba(255,255,255,.55); }

/* =========================================================
   LARPERS — hranatý mechanismus
   ========================================================= */

.larpers {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(90px, 16vh, 180px) var(--gutter);
}
.larpers .section-title { margin-bottom: clamp(24px, 5vh, 60px); }

.sigil {
  position: relative;
  width: min(100%, 860px, 94vh);
  aspect-ratio: 1;
  margin: 0 auto;
  perspective: 1400px;
  --tile: 14cqw;
  -webkit-user-select: none;
  user-select: none;
}
.sigil-tilt {
  position: absolute;
  inset: 0;
  container-type: size;
  will-change: transform;
}

/* --- rytý rám --- */
.sigil-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: rgba(255,255,255,.22);
  stroke-width: 1;
}
.sigil-frame rect,
.sigil-frame line { vector-effect: non-scaling-stroke; }
.sigil-frame .draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 2.6s var(--ease-io);
}
.sigil-frame .draw--late { transition-delay: .3s; }
.sigil.is-revealed .sigil-frame .draw { stroke-dashoffset: 0; }
.sigil-frame .track {
  stroke: rgba(255,255,255,.16);
  stroke-dasharray: 2 9;
  opacity: 0;
  transition: opacity 2s ease 1s;
}
.sigil-frame .marks {
  opacity: 0;
  transition: opacity 1.6s ease 1.3s;
}
.sigil.is-revealed .sigil-frame .track,
.sigil.is-revealed .sigil-frame .marks { opacity: 1; }
.sigil-frame .marks line { stroke: rgba(255,255,255,.28); }
.sigil-frame text {
  fill: rgba(255,255,255,.3);
  stroke: none;
  font: 400 11px var(--f-mono);
  letter-spacing: 3px;
}

/* --- otáčející se osmicípý sigil za oltářem --- */
.sig-rot {
  position: absolute;
  inset: 0;
  opacity: 0;
  will-change: transform;
  transition: opacity 2s ease .8s;
}
.sigil.is-revealed .sig-rot { opacity: 1; }
.sig-rot svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: rgba(255,255,255,.14);
  stroke-width: 1;
}
.sig-rot rect { vector-effect: non-scaling-stroke; }
.sig-rot--a { animation: spin 240s linear infinite; }
.sig-rot--b { animation: spin 150s linear infinite reverse; }
.sig-rot--b svg { stroke: rgba(255,255,255,.2); stroke-dasharray: 3 7; }

/* --- linka od brány k oltáři --- */
.sigil-link {
  position: absolute;
  left: 50%;
  top: calc(12.5cqw + var(--tile) * .65);
  width: 1px;
  height: calc(17.5cqw - var(--tile) * .65);
  margin-left: -.5px;
  overflow: hidden;
  background: rgba(255,255,255,.24);
  transform-origin: top;
  transform: scaleY(0);
  transition: transform 1.2s var(--ease-io) 1.4s;
}
.sigil.is-revealed .sigil-link { transform: none; }
.sigil-link i {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 45%;
  background: linear-gradient(transparent, #fff);
  transform: translateY(-100%);
}

/* --- oltář --- */
.altar {
  position: absolute;
  left: 30cqw;
  top: 30cqw;
  width: 40cqw;
  height: 40cqw;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #060606;
  opacity: 0;
  transition: opacity 1.4s ease .6s, border-color .5s;
  -webkit-tap-highlight-color: transparent;
}
.sigil.is-revealed .altar { opacity: 1; }
.altar:hover { border-color: rgba(255,255,255,.55); }
.altar-photo {
  position: absolute;
  inset: 0;
}
.altar-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(to top, rgba(0,0,0,.9), rgba(0,0,0,.25) 45%, transparent 65%);
}
.altar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: grayscale(1) contrast(1.15) brightness(.78);
  transition: opacity .6s ease, filter 1s ease;
}
.altar-img.is-on { opacity: 1; }
.altar:hover .altar-img.is-on { filter: grayscale(1) contrast(1.2) brightness(.95); }
.altar.is-dim .altar-img.is-on {
  opacity: .16;
  filter: grayscale(1) contrast(1.15) brightness(.78) blur(6px);
}
.altar-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 3;
  height: 1px;
  background: #fff;
  box-shadow: 0 0 12px 2px rgba(255,255,255,.55);
  opacity: 0;
  pointer-events: none;
}
.altar-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42%;
  height: auto;
  translate: -50% -50%;
  opacity: .3;
  transition: opacity 1.2s ease;
}
.sigil.has-active .altar-logo { opacity: 0; }
.altar-num {
  position: absolute;
  left: 7%;
  top: 6%;
  z-index: 3;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(14px, 2.6cqw, 26px);
  line-height: 1;
  text-shadow: 0 0 14px rgba(255,255,255,.4);
  transition: opacity .5s;
}
.altar-corner {
  position: absolute;
  z-index: 3;
  width: 7%;
  height: 7%;
  border: 0 solid var(--ink);
  pointer-events: none;
}
.altar-corner--tl { top: 3%; left: 3%; border-top-width: 1px; border-left-width: 1px; }
.altar-corner--tr { top: 3%; right: 3%; border-top-width: 1px; border-right-width: 1px; }
.altar-corner--bl { bottom: 3%; left: 3%; border-bottom-width: 1px; border-left-width: 1px; }
.altar-corner--br { bottom: 3%; right: 3%; border-bottom-width: 1px; border-right-width: 1px; }
.altar-name {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  align-content: end;
  justify-items: center;
  gap: .12em;
  padding: 0 9% 10%;
  text-align: center;
  pointer-events: none;
  transition: opacity .5s ease;
}
.altar.is-dim .altar-name,
.altar.is-dim .altar-num { opacity: 0; }
.an-first, .an-last {
  font-weight: 900;
  font-stretch: 112%;
  font-size: clamp(14px, 4.2cqw, 38px);
  line-height: .95;
  letter-spacing: -.02em;
  text-transform: uppercase;
  text-shadow: 0 2px 20px rgba(0,0,0,.9);
  overflow-wrap: anywhere;
}
.an-nick {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(12px, 2.9cqw, 26px);
  line-height: 1;
  color: var(--ink-soft);
  text-shadow: 0 2px 16px rgba(0,0,0,.9);
}
.an-nick:empty, .an-last:empty { display: none; }

/* --- dlaždice členů na dráze (pozici řídí JS) --- */
.sigil-tiles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.tile {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--tile);
  height: var(--tile);
  margin: calc(var(--tile) / -2) 0 0 calc(var(--tile) / -2);
  pointer-events: auto;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}
.tile-in {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  scale: .3;
  transition: opacity .9s ease, scale 1.2s var(--ease-out);
  transition-delay: calc(var(--i) * 120ms + .6s);
}
.sigil.is-revealed .tile-in { opacity: 1; scale: 1; }
/* čárkovaný čtverec se po najetí otočí do kosočtverce */
.tile-in::before {
  content: "";
  position: absolute;
  inset: -12%;
  border: 1px dashed rgba(255,255,255,.5);
  opacity: 0;
  rotate: 0deg;
  pointer-events: none;
  transition: opacity .4s ease, rotate .8s var(--ease-out);
}
.tile:hover .tile-in::before,
.tile:focus-visible .tile-in::before,
.tile.is-gate .tile-in::before { opacity: 1; rotate: 45deg; }
.tile-photo {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #080808;
  transition: border-color .5s, box-shadow .5s, scale .6s var(--ease-out);
}
.tile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.15) brightness(.55);
  transition: filter .6s ease;
}
.tile:hover .tile-photo,
.tile.is-gate .tile-photo {
  border-color: var(--ink);
  box-shadow: 0 0 24px rgba(255,255,255,.22);
}
.tile:hover .tile-photo { scale: 1.08; }
.tile:hover .tile-photo img,
.tile.is-gate .tile-photo img { filter: grayscale(1) contrast(1.2) brightness(1); }
.tile-num {
  position: absolute;
  left: 8%;
  bottom: 7%;
  z-index: 1;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(10px, 1.7cqw, 16px);
  line-height: 1;
  color: var(--ink-soft);
  text-shadow: 0 1px 8px rgba(0,0,0,.9);
}
.tile.is-gate .tile-num { color: var(--ink); }
.tile:focus-visible { outline: none; }
.tile:focus-visible .tile-photo { outline: 1px dashed var(--ink); outline-offset: 5px; }
.is-src-away { visibility: hidden; }

/* --- brána nahoře --- */
.sigil-gate {
  position: absolute;
  left: 50cqw;
  top: 12.5cqw;
  width: calc(var(--tile) * 1.3);
  height: calc(var(--tile) * 1.3);
  margin: calc(var(--tile) * -.65) 0 0 calc(var(--tile) * -.65);
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease 1.6s;
}
.sigil.is-revealed .sigil-gate { opacity: 1; }
.sigil-gate i {
  position: absolute;
  width: 16%;
  height: 16%;
  border: 0 solid var(--ink);
}
.sigil-gate i:nth-child(1) { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.sigil-gate i:nth-child(2) { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.sigil-gate i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.sigil-gate i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

/* --- jiskry obíhající rám --- */
.sigil-spark {
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 3px;
  margin: -1.5px 0 0 -1.5px;
  background: #fff;
  box-shadow: 0 0 8px 2px rgba(255,255,255,.7), 0 0 22px 6px rgba(255,255,255,.16);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease 2.4s;
  animation: trace 44s linear infinite;
}
.sigil-spark--b { animation-delay: -22s; }
.sigil.is-revealed .sigil-spark { opacity: .9; }
@keyframes trace {
  0%    { translate: 50cqw 1.7cqw; }
  12.5% { translate: 98.3cqw 1.7cqw; }
  37.5% { translate: 98.3cqw 98.3cqw; }
  62.5% { translate: 1.7cqw 98.3cqw; }
  87.5% { translate: 1.7cqw 1.7cqw; }
  100%  { translate: 50cqw 1.7cqw; }
}

.sigil.is-offscreen .sig-rot,
.sigil.is-offscreen .sigil-spark { animation-play-state: paused; }

/* =========================================================
   BLIKAJÍCÍ LFL
   ========================================================= */

.signs {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 6vh, 70px) 0;
  -webkit-user-select: none;
  user-select: none;
}
.signs::before,
.signs::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 20%, var(--line-strong) 80%, transparent);
}
.signs::before { top: 0; }
.signs::after { bottom: 0; }
.signs-track {
  display: flex;
  width: max-content;
  will-change: transform;
}
.signs-chunk {
  display: flex;
  gap: clamp(20px, 3.5vw, 60px);
  padding-right: clamp(20px, 3.5vw, 60px);
}
.sign {
  position: relative;
  flex: none;
  width: clamp(140px, 19vw, 300px);
  aspect-ratio: 5 / 4;
}
.sign img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sign-off { opacity: .07; }
.sign-on { opacity: 0; will-change: opacity; }

/* =========================================================
   DETAIL ČLENA (modal)
   ========================================================= */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(16px, 5vw, 72px);
  overflow-y: auto;
  overscroll-behavior: contain;
  visibility: hidden;
  pointer-events: none;
}
.modal.is-open { visibility: visible; pointer-events: auto; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .6s ease;
}
.modal.is-open .modal-backdrop { opacity: 1; }
.modal.is-closing .modal-backdrop { opacity: 0; transition-delay: .2s; }

.modal-close {
  position: fixed;
  top: 18px;
  right: var(--gutter);
  z-index: 3;
  opacity: 0;
  transition: opacity .4s, background-color .35s, color .35s, border-color .35s, transform .5s var(--ease-out);
}
.modal.is-in .modal-close { opacity: 1; transition-delay: .3s, 0s, 0s, 0s, 0s; }
.modal-close:hover { transform: rotate(90deg); }

.modal-shell {
  position: relative;
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: center;
}

.modal-media {
  position: relative;
  aspect-ratio: 3 / 4;
  max-height: calc(100svh - 2 * clamp(16px, 5vw, 72px));
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #080808;
  opacity: 0;
}
.modal.is-in .modal-media { opacity: 1; }
.modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.15) brightness(.85);
  transition: opacity .35s ease, transform 1.2s var(--ease-out);
}
.modal.is-switching .modal-media img { opacity: 0; transform: scale(1.04); }
.modal-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.55), transparent 35%);
  pointer-events: none;
}
.modal-num {
  position: absolute;
  left: 22px;
  bottom: 16px;
  z-index: 1;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1;
  text-shadow: 0 0 24px rgba(255,255,255,.4);
}
.modal-corner {
  position: absolute;
  z-index: 1;
  width: 18px;
  height: 18px;
  border: 0 solid var(--ink);
}
.modal-corner--tl { top: 12px; left: 12px; border-top-width: 1px; border-left-width: 1px; }
.modal-corner--tr { top: 12px; right: 12px; border-top-width: 1px; border-right-width: 1px; }
.modal-corner--bl { bottom: 12px; left: 12px; border-bottom-width: 1px; border-left-width: 1px; }
.modal-corner--br { bottom: 12px; right: 12px; border-bottom-width: 1px; border-right-width: 1px; }

.modal-body {
  display: grid;
  gap: 20px;
  align-content: center;
}
.m-in {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .25s ease, transform .3s ease;
}
.modal.is-in .m-in {
  opacity: 1;
  transform: none;
  transition: opacity .8s ease, transform 1s var(--ease-out);
}
.modal.is-in .m-in:nth-child(1) { transition-delay: .05s; }
.modal.is-in .m-in:nth-child(2) { transition-delay: .14s; }
.modal.is-in .m-in:nth-child(3) { transition-delay: .22s; }
.modal.is-in .m-in:nth-child(4) { transition-delay: .3s; }
.modal.is-in .m-in:nth-child(5) { transition-delay: .38s; }
.modal.is-in.is-switching .m-in:not(.modal-deck) {
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity .25s ease, transform .3s ease;
  transition-delay: 0s;
}

.modal-name {
  display: grid;
  gap: .06em;
  margin: 0;
  font-weight: 900;
  font-stretch: 112%;
  font-size: clamp(34px, 5.2vw, 76px);
  line-height: .92;
  letter-spacing: -.025em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.mn-nick {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  font-size: .6em;
  line-height: 1.05;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
}
.mn-nick:empty, .mn-last:empty { display: none; }

.modal-quote {
  margin: 0;
  padding-left: 18px;
  border-left: 1px solid var(--line-strong);
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.35;
  color: var(--ink-soft);
}
.modal-quote:empty { display: none; }
.modal-bio {
  margin: 0;
  max-width: 54ch;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft);
}
.modal-bio:empty { display: none; }
.modal-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0 24px;
  margin: 0;
}
.modal-facts:empty { display: none; }
.modal-facts div {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.modal-facts dt {
  margin-bottom: 6px;
  font: 400 9px/1.2 var(--f-mono);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.modal-facts dd {
  margin: 0;
  font-weight: 600;
  font-size: 15px;
}

/* --- filmový pás pro přepínání --- */
.modal-deck {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 6px;
}
.modal-deck[hidden] { display: none; }
.deck-arrow--prev:hover svg { transform: translateX(-3px); }
.deck-arrow--next:hover svg { transform: translateX(3px); }

.deck {
  position: relative;
  flex: 1;
  height: 84px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
}
.deck::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--line);
}
.deck-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 46px;
  margin: -23px 0 0 -17px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #080808;
  transform: translateX(var(--dx, 0px)) translateY(var(--hov, 0px)) scale(var(--sc, 1));
  transition: transform .8s var(--ease-io), opacity .6s ease, border-color .4s, box-shadow .4s;
}
.deck-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.15) brightness(.5);
  transition: filter .4s;
}
.deck-card span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  text-align: center;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 10px;
  line-height: 1;
  color: var(--ink-soft);
}
.deck-card:hover { --hov: -4px; border-color: rgba(255,255,255,.5); }
.deck-card:hover img { filter: grayscale(1) contrast(1.15) brightness(.8); }
.deck-card.is-active {
  border-color: var(--ink);
  box-shadow: 0 0 18px rgba(255,255,255,.2), 0 10px 24px rgba(0,0,0,.8);
}
.deck-card.is-active img { filter: grayscale(1) contrast(1.15) brightness(1); }
.deck-card.is-active span { color: var(--ink); }

.ghost {
  position: fixed;
  z-index: 110;
  overflow: hidden;
  border-radius: 2px;
  border: 1px solid var(--line-strong);
  background: #080808;
  pointer-events: none;
  box-shadow: 0 30px 80px rgba(0,0,0,.8);
}
.ghost img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.15) brightness(.85);
}

/* =========================================================
   PATIČKA / KONTAKT
   ========================================================= */

.footer {
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(100px, 18vh, 200px) var(--gutter) 26px;
}

.footer-title {
  margin: 0;
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(60px, 16vw, 260px);
  line-height: .84;
  letter-spacing: -.035em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ft-ch {
  display: inline-block;
  font-variation-settings: "wght" 900, "wdth" 125;
}

.contacts {
  list-style: none;
  margin: clamp(56px, 10vh, 110px) 0 0;
  padding: 0;
  border-top: 1px solid var(--line-strong);
}
.contact a {
  position: relative;
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto auto;
  align-items: center;
  gap: clamp(14px, 3vw, 40px);
  padding: clamp(18px, 3vh, 30px) clamp(8px, 1.4vw, 20px);
  border-bottom: 1px solid var(--line-strong);
  overflow: hidden;
  isolation: isolate;
  transition: color .5s var(--ease-io);
}
.contact a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .6s var(--ease-io);
}
.contact a:hover,
.contact a:focus-visible { color: #050505; }
.contact a:hover::before,
.contact a:focus-visible::before { transform: scaleY(1); transform-origin: top; }
.contact-label {
  font: 400 11px/1 var(--f-mono);
  letter-spacing: .26em;
  text-transform: uppercase;
  opacity: .6;
}
.contact-value {
  font-weight: 700;
  font-stretch: 105%;
  font-size: clamp(22px, 3.2vw, 46px);
  line-height: 1.05;
  letter-spacing: -.02em;
  text-align: right;
  overflow-wrap: anywhere;
}
.contact-arrow {
  font-size: clamp(18px, 2.4vw, 34px);
  line-height: 1;
  transition: transform .6s var(--ease-out);
}
.contact a:hover .contact-arrow { transform: rotate(45deg); }

.footer-logo {
  position: relative;
  width: min(520px, 78vw);
  aspect-ratio: 1;
  margin: clamp(60px, 12vh, 140px) auto clamp(30px, 6vh, 70px);
  --mx: 50%;
  --my: 50%;
}
.footer-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.footer-logo-base { opacity: .08; }
.footer-logo-lit {
  -webkit-mask-image: radial-gradient(circle calc(min(520px, 78vw) * .34) at var(--mx) var(--my), #000 0%, rgba(0,0,0,.6) 35%, transparent 72%);
  mask-image: radial-gradient(circle calc(min(520px, 78vw) * .34) at var(--mx) var(--my), #000 0%, rgba(0,0,0,.6) 35%, transparent 72%);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font: 400 10px/1.4 var(--f-mono);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.to-top:hover svg { transform: translateY(-3px); }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 190;
  padding: 12px 18px;
  background: var(--ink);
  color: #000;
  font: 500 11px/1 var(--f-mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  border-radius: 2px;
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity .4s, transform .5s var(--ease-out);
  pointer-events: none;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Easter eggy ---------- */

html.is-inverted { filter: invert(1); }

.burd {
  position: fixed;
  top: 50%;
  left: 100%;
  z-index: 175;
  width: max-content;
  height: min(72vh, 680px);
  pointer-events: none;
  transform: translate(0, -50%);
}
.burd.is-go { animation: burdSlide 22s linear forwards; }
.burd-dodge { transition: transform .8s cubic-bezier(.3, 1.6, .5, 1); }
.burd img {
  display: block;
  width: auto;
  height: 100%;
  max-width: none;
  border-radius: 4px;
  box-shadow: 0 40px 100px rgba(0,0,0,.85);
  animation: burdBob 2.8s ease-in-out infinite alternate;
}
@keyframes burdSlide {
  from { transform: translate(0, -50%); }
  to   { transform: translate(calc(-100vw - 100%), -50%); }
}
@keyframes burdBob {
  from { transform: translateY(-14px) rotate(-2deg); }
  to   { transform: translateY(14px) rotate(2deg); }
}

/* =========================================================
   RESPONZIVITA
   ========================================================= */

@media (max-width: 980px) {
  .modal-shell { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
}

@media (max-width: 760px) {
  .rail { display: none; }
  .brand { top: 10px; width: 44px; height: 44px; }

  .hero-title { font-size: min(19svh, 23.5vw); }

  .modal { place-items: start center; }
  .modal-shell {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 56px 0 24px;
  }
  .modal-media {
    aspect-ratio: 4 / 5;
    max-height: 62svh;
  }
  .modal-close {
    top: 10px;
    width: 44px;
    height: 44px;
    background: rgba(0,0,0,.6);
  }

  .contact a { grid-template-columns: 1fr auto; }
  .contact-label { grid-column: 1 / -1; }
  .contact-value { text-align: left; }
}

@media (max-width: 420px) {
  .icon-btn { width: 44px; height: 44px; }
  .deck-card { width: 30px; height: 40px; margin: -20px 0 0 -15px; }
}

/* =========================================================
   OMEZENÝ POHYB
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
  .grain { animation: none; }
  .ch { --a: 1; }
}
