/* ==========================================================================
   staynoir. — noir: černá, bílá, šedá. Zlatá jen jako akcent.
   Bez JS (a při prefers-reduced-motion) je to obyčejná čitelná stránka;
   třída .cine (nastaví boot.js) z ní udělá scrollem řízenou scénu.
   ========================================================================== */

:root {
  --ink: #08080a;
  --ink-2: #111114;
  --paper: #ecebe6;
  --grey: #8a8990;
  --grey-2: #3a3a40;
  --gold: #ffd369;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --gutter: clamp(18px, 5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ink); }
body {
  margin: 0; color: var(--paper); background: var(--ink);
  font-family: var(--font); line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 6px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip {
  position: fixed; top: 12px; left: 12px; z-index: 100; padding: 10px 16px;
  background: var(--paper); color: var(--ink); font-weight: 700; text-decoration: none;
  transform: translateY(-200%); transition: transform .2s var(--ease);
}
.skip:focus { transform: none; }

/* ---------------------------------------------------------------- HUD */
.hud {
  position: fixed; inset: 0 0 auto 0; z-index: 20; pointer-events: none;
  display: none; align-items: center; justify-content: space-between; gap: 20px;
  padding: 18px var(--gutter);
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--grey);
  transition: opacity .6s var(--ease);
}
.cine .hud { display: flex; }
.hud.is-off { opacity: 0; }
.hud__logo { font-family: var(--font); font-size: 15px; font-weight: 800; letter-spacing: -.03em; color: var(--paper); }
.hud__logo i { font-style: normal; color: var(--gold); }
.hud__meta { display: flex; gap: clamp(12px, 3vw, 28px); }
.hud__meta b { color: var(--paper); font-weight: 500; font-variant-numeric: tabular-nums; }
.hud__bar { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0; height: 1px; background: var(--grey-2); }
.hud__bar i { display: block; height: 100%; width: 100%; background: var(--paper); transform-origin: left; transform: scaleX(0); }
@media (max-width: 520px) { .hud__meta span:last-child { display: none; } }

/* ------------------------------------------------------------- scéna */
/* výchozí (bez JS): obyčejný tok textu */
.journey { padding: 18vh var(--gutter) 10vh; }
.stage { display: grid; gap: 4vh; justify-items: start; }
.stage__canvas { display: none; }

.mark {
  margin: 0 0 6vh; font-size: clamp(64px, 16vw, 240px); font-weight: 800;
  letter-spacing: -.065em; line-height: .9; white-space: nowrap;
}
.mark__dot {
  display: inline-block; width: .2em; height: .2em; margin-left: .02em;
  border-radius: 50%; background: var(--gold); vertical-align: baseline;
}

.caption {
  margin: 0; max-width: min(92vw, 32ch);
  font-size: clamp(28px, 5vw, 68px); font-weight: 650; letter-spacing: -.035em; line-height: 1.04;
}
.caption b { font-weight: 650; color: var(--gold); font-variant-numeric: tabular-nums; }
.caption--hint { font-family: var(--mono); font-size: 13px; font-weight: 400; letter-spacing: .08em; color: var(--grey); max-width: none; display: none; }
.cine .caption--hint { display: block; }   /* nápověda ke scrollu má smysl jen ve scéně */
.scroll-cue { display: none; }

/* s JS: přilepené kino */
.cine .journey { height: 900vh; padding: 0; }
.cine .stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: block;
}
.cine .stage__canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }

.cine .mark {
  position: absolute; left: 50%; top: 50%; margin: 0;
  transform: translate(-50%, -55%);
  will-change: transform, opacity;
}
.cine .mark__dot { visibility: hidden; }   /* tečku kreslí canvas — ostrá v každém měřítku */

.cine .caption {
  position: absolute; left: var(--gutter); bottom: 13vh;
  opacity: 0; transform: translateY(24px);
  transition: opacity .6s var(--ease), transform .8s var(--ease);
  pointer-events: none;
}
.cine .caption.is-on { opacity: 1; transform: none; }
.cine .caption--hint { left: 50%; bottom: 17vh; transform: translate(-50%, 0); white-space: nowrap; }
.cine .caption--hint.is-on { transform: translate(-50%, 0); }

.cine .scroll-cue {
  display: block; position: absolute; left: 50%; bottom: 7vh; width: 1px; height: 52px; margin-left: -.5px;
  background: var(--grey-2); overflow: hidden; opacity: 0; transition: opacity .6s;
}
.cine .scroll-cue.is-on { opacity: 1; }
.scroll-cue i {
  display: block; width: 100%; height: 40%; background: var(--gold);
  animation: cue 1.8s infinite var(--ease);
}
@keyframes cue { from { transform: translateY(-100%); } to { transform: translateY(260%); } }

/* ------------------------------------------------------------ kontakt */
.contact {
  min-height: 100vh; min-height: 100svh;
  display: grid; align-content: center; justify-items: center; gap: 4vh;
  padding: 14vh var(--gutter); text-align: center;
}
.contact__title {
  margin: 0; font-family: var(--mono); font-size: 12px; font-weight: 400;
  letter-spacing: .3em; text-transform: uppercase; color: var(--grey);
}
.contact__mail {
  position: relative; display: inline-block;
  font-size: clamp(34px, 8.5vw, 140px); font-weight: 800; letter-spacing: -.055em; line-height: 1;
  text-decoration: none; overflow-wrap: anywhere;
}
.contact__mail .at { color: var(--grey); font-weight: 300; }
.contact__dot { color: var(--gold); }
.contact__mail::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.12em; height: 2px;
  background: var(--gold); transform: scaleX(0); transform-origin: right;
  transition: transform .6s var(--ease);
}
.contact__mail:hover::after, .contact__mail:focus-visible::after { transform: scaleX(1); transform-origin: left; }

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.actions[hidden] { display: none; }
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px; min-height: 44px;            /* dost velký cíl pro prst */
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--grey); background: transparent;
  border: 1px solid var(--grey-2); border-radius: 999px; cursor: pointer;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.pill:hover, .pill:focus-visible { color: var(--paper); border-color: var(--gold); }
.pill svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pill.is-done { color: var(--gold); border-color: var(--gold); }

.facts {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 36px;
  margin: 3vh 0 0; font-family: var(--mono); font-size: 12px; letter-spacing: .06em;
}
.facts[hidden] { display: none; }
.facts div { display: grid; gap: 4px; }
.facts dt { color: var(--grey); }
.facts dd { margin: 0; font-size: 15px; color: var(--paper); font-variant-numeric: tabular-nums; }

/* přepínač plná / lehká scéna — jen když běží scéna; aktivní úroveň je světlá */
.qsw {
  display: none; position: fixed; z-index: 21; top: 48px; right: var(--gutter);
  border: 1px solid var(--grey-2); border-radius: 999px; overflow: hidden;
  background: rgba(6, 6, 7, .55);
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em;
}
.cine .qsw { display: flex; }
.qsw button {
  padding: 6px 14px; border: 0; background: none; color: var(--grey); cursor: pointer;
  font: inherit; letter-spacing: inherit;
}
.qsw button[aria-pressed="true"] { background: var(--paper); color: #060607; cursor: default; }
.qsw button[aria-pressed="false"]:hover, .qsw button:focus-visible { color: var(--paper); }

/* ------------------------------------------------------------- patička */
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  padding: 22px var(--gutter); border-top: 1px solid var(--grey-2);
  font-family: var(--mono); font-size: 12px; letter-spacing: .05em; color: var(--grey);
}

/* ---------------------------------------------- jednoduché stránky (404) */
.simple { min-height: 100svh; display: grid; align-content: center; gap: 3vh; padding: 10vh var(--gutter); }
.simple h1 { margin: 0; font-size: clamp(64px, 14vw, 200px); font-weight: 800; letter-spacing: -.06em; line-height: .9; }
.simple h1 i { font-style: normal; color: var(--gold); }
.simple p { margin: 0; color: var(--grey); font-family: var(--mono); font-size: 13px; letter-spacing: .06em; }
.simple a { color: var(--paper); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
