:root {
  --bg: #0a0a0a;
  --ink: #f2efe9;
  --ink-dim: #9a968d;
  --line: rgba(242,239,233,0.14);
  --accent: #c9a769;
  --serif: 'Fraunces', serif;
  --sans: 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  height: 100vh;
}

h1 { font-family: var(--serif); font-weight: 500; margin: 0; }

p { line-height: 1.75; color: var(--ink-dim); margin: 0; }

a { color: inherit; text-decoration: none; }
button { font: inherit; }

.center { text-align: center; }

.kicker {
  font-family: var(--mono);
  color: var(--accent);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: 0.72rem;
  margin: 0 0 24px;
}
.kicker.center { text-align: center; }

/* Hero — the whole visible app; everything happens inside this single 100vh screen */
/* Language toggle — appears once the visitor enters the site */
.lang-toggle {
  position: fixed;
  top: 78px; right: 22px;
  z-index: 300;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 1px;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, border-color 0.2s, color 0.2s;
}
body.entered .lang-toggle { opacity: 1; pointer-events: auto; }
.lang-toggle:hover { border-color: var(--accent); color: var(--ink); }

.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 25%;
  filter: contrast(1.1) brightness(0.6) saturate(1.05);
  transition: filter 0.8s ease;
  z-index: 0;
}
.hero.hub-active .hero-bg { filter: contrast(1.1) brightness(0.32) saturate(0.9); }
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(10,10,10,0.2) 0%, rgba(10,10,10,0.88) 75%);
  z-index: 1;
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: opacity 0.5s ease;
}
.hero.hub-active .hero-content { opacity: 0; pointer-events: none; }

.hero-title {
  font-size: clamp(4.2rem, 15vw, 10.5rem);
  line-height: 0.88;
  letter-spacing: -2px;
  color: var(--ink);
  font-weight: 400;
}
.hero-title-inner {
  display: inline-block;
  cursor: pointer;
  outline: none;
  transform: scale(1);
  transition: transform 0.6s cubic-bezier(.2,.8,.2,1);
}
.hero-title-inner:hover,
.hero-title-inner:focus-visible { transform: scale(1.08); }
.hero-title-pulse {
  display: inline-block;
  animation: luxPulse 2s ease-in-out infinite;
  transform-origin: center;
}
.hero-title-inner.entering {
  transform: scale(1.35);
  opacity: 0;
  transition: transform 0.9s cubic-bezier(.4,0,.2,1), opacity 0.7s ease 0.2s;
}
.hero-title-inner.entering .hero-title-pulse { animation: none; }
@keyframes luxPulse {
  0%, 100% { transform: scale(1); text-shadow: 0 0 36px rgba(201,167,105,0.12), 0 0 2px rgba(242,239,233,0.2); }
  50% { transform: scale(1.035); text-shadow: 0 0 64px rgba(201,167,105,0.32), 0 0 2px rgba(242,239,233,0.3); }
}

/* Hub — 4 cards that burst outward from the exact center + quick contact. Overlays the hero, no scrolling to reach it. */
.hub {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 40px;
  padding: 28px;
  opacity: 0;
  pointer-events: none;
  overflow-y: auto;
  transition: opacity 0.4s ease;
}
.hero.hub-active .hub { opacity: 1; pointer-events: auto; }

.hub-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 560px;
}
.hub-card {
  border: 1px solid var(--line);
  background: transparent;
  padding: 22px 8px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.25s, transform 0.25s, background 0.25s;
  opacity: 0;
  transform: scale(0.2);
}
.hero.hub-active .hub-card {
  animation: hubBurst 0.7s cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay: calc(var(--i) * 0.08s);
}
@keyframes hubBurst {
  0% { opacity: 0; transform: scale(0.2); }
  100% { opacity: 1; transform: scale(1); }
}
.hub-card:hover { border-color: var(--accent); background: rgba(201,167,105,0.06); transform: translateY(-3px); }

.quick-form { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 560px; }
.quick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.quick-form input,
.quick-form textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.95rem;
  text-align: center;
  resize: none;
}
.quick-form input:focus,
.quick-form textarea:focus { outline: none; border-color: var(--accent); }

.hub-footer {
  position: absolute;
  left: 0; right: 0;
  bottom: 22px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 1px;
  color: var(--ink-dim);
  text-align: center;
}

.btn {
  display: inline-block;
  padding: 15px 30px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--ink);
  transition: background 0.25s, color 0.25s;
}
.btn:hover { background: var(--accent); color: #0a0a0a; }
.btn-block { width: 100%; text-align: center; }

.form-status { min-height: 20px; font-size: 0.85rem; margin: 0; font-family: var(--mono); }
.form-status.ok { color: #8fbc8f; }
.form-status.err { color: #d98a8a; }

/* Panels — full-screen overlays for Fotky/Videa/Akce/Bio, opened from hub cards */
.panel {
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100dvh; /* tracks the real visible area as iOS Safari's toolbar shows/hides — inset:0 alone leaves a dead zone at the bottom */
  z-index: 150;
  background: var(--bg);
  overflow: hidden; /* scrolling happens on .panel-scroll — see note there */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  /* No transform here (even scale(1) at rest) — WebKit visibly degrades touch-scroll
     responsiveness for a scrollable descendant sitting inside a transformed ancestor,
     even when the scroll container itself is untransformed. Opacity-only fade instead. */
}
.panel.open { opacity: 1; pointer-events: auto; }
.panel-scroll {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  touch-action: pan-y;
  /* No -webkit-overflow-scrolling:touch — that legacy property forces the old
     UIScrollView-style scrolling mode, which on modern iOS can itself cause
     intermittent "needs a few tries" scroll misfires. Plain overflow-y:auto
     already gets native momentum scrolling since iOS 13. */
  /* This element (not .panel) does the actual scrolling — full-width so a
     mouse wheel or swipe works anywhere in the panel, not just over the
     centered content column. iOS Safari also has a long-standing bug where
     the first swipe is ignored on a scroll container that also has
     `transform` applied, even scale(1); .panel carries the open/close
     transform, so this layer stays untransformed and scrolls normally from
     the very first touch. touch-action:pan-y forces vertical swipes to
     always scroll even when the finger lands on a clickable gallery item
     (Safari otherwise sometimes hesitates between tap and pan there). */
}
.panel-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 90px 28px 90px;
}
.panel-close {
  position: fixed;
  top: 24px; right: 28px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  z-index: 151;
}
.panel-close:hover { border-color: var(--accent); }
.bio-layout { display: flex; gap: 48px; align-items: flex-start; }
.bio-portrait { flex: 0 0 260px; }
.bio-portrait img { width: 100%; aspect-ratio: 4/5; object-fit: cover; filter: grayscale(0.5) contrast(1.05); }
.bio-text { flex: 1; min-width: 0; }
.bio-line { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); max-width: 640px; }
.bio-line + .bio-line { margin-top: 20px; }

@media (max-width: 640px) {
  .bio-layout { flex-direction: column; gap: 28px; }
  .bio-portrait { flex-basis: auto; max-width: 220px; }
}
.panel-note { margin-top: 20px; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 1px; color: var(--ink-dim); }

/* Persistent player bar — floats over the whole site, survives panel switches */
.player-bar {
  position: fixed;
  left: 20px; bottom: 20px;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(10,10,10,0.94);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 18px 12px 10px;
  width: 300px;
  max-width: calc(100vw - 40px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.player-bar[hidden] { display: flex; opacity: 0; pointer-events: none; transform: translateY(10px); }
.player-toggle, .player-next {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s;
}
.player-toggle:hover, .player-next:hover { border-color: var(--accent); }
.player-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.player-track {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 1px;
  color: var(--ink-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-seek {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: var(--line);
  cursor: pointer;
  margin: 0;
}
.player-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  margin-top: -4px;
}
.player-seek::-webkit-slider-runnable-track { height: 3px; border-radius: 999px; background: var(--line); }
.player-seek::-moz-range-thumb {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
}
.player-seek::-moz-range-track { height: 3px; border-radius: 999px; background: var(--line); }

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/5;
  background: #111;
  touch-action: pan-y;
}
.gallery-item img, .gallery-item video {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(0.7);
  transition: transform 0.6s ease, filter 0.4s ease;
}
/* hover:hover excludes touchscreens — iOS simulates :hover on tap, and a
   transform change on the touched element mid-gesture breaks scroll recognition. */
@media (hover: hover) and (pointer: fine) {
  .gallery-item:hover img, .gallery-item:hover video { transform: scale(1.04); filter: grayscale(0); }
}
.gallery-item .play-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--ink);
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
}
.gallery-loading { color: var(--ink-dim); grid-column: 1/-1; padding: 20px 0; }

/* Lightbox — enlarges a single photo/video from inside a panel */
.lightbox {
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  background: rgba(5,5,5,0.96);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox-inner { max-width: 880px; width: 100%; }
.lightbox-inner img, .lightbox-inner video { width: 100%; max-height: 82vh; object-fit: contain; }
.lightbox-close {
  position: absolute;
  top: 24px; right: 28px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
}
.lightbox-close:hover { border-color: var(--accent); }

/* Shows (Akce panel) */
.shows-list { border-top: 1px solid var(--line); }
.show-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 24px;
  padding: 24px 16px;
  margin: 0 -16px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
  transition: background 0.3s, padding-left 0.3s;
}
.show-row:hover { background: rgba(201,167,105,0.06); padding-left: 24px; }
.show-date { font-family: var(--mono); color: var(--accent); font-size: 0.85rem; }
.show-name { color: var(--ink); font-family: var(--serif); font-size: 1.15rem; }
.show-place { color: var(--ink-dim); font-size: 0.85rem; text-align: right; }

.show-row--past { opacity: 0.55; }
.show-row--past .show-date { color: var(--ink-dim); }
.badge-past {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
}

@media (max-height: 700px) {
  .hub { gap: 22px; }
  .hub-card { padding: 14px 8px; }
}

/* Responsive */
@media (max-width: 640px) {
  .hub-cards { grid-template-columns: repeat(2, 1fr); }
  .quick-row { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .show-row { grid-template-columns: 1fr; }
  .show-place { text-align: left; }
  /* Compact player bar on mobile — still shows track name + seek bar, just smaller.
     Sits above the copyright line, which stays pinned to the true bottom of the page. */
  .player-bar { width: auto; max-width: 220px; left: 14px; bottom: 40px; padding: 8px 12px 8px 8px; gap: 8px; }
  .player-toggle, .player-next { width: 28px; height: 28px; }
  .player-track { font-size: 0.62rem; max-width: 100px; }
  .hub-footer { bottom: 10px; }
}
