/* =================================================================
   DESIGN TOKENS
   Teplý antracit místo čisté černé, aby černobílé fotografie
   nepůsobily "klinicky" a měly prostor vyniknout. Bronzový akcent
   je použit jen minimálně — evokuje cedulky u obrazů v galerii.
================================================================= */
:root {
  --color-bg: #121110;
  --color-bg-raised: #181715;
  --color-text: #f1ede6;
  --color-text-muted: #9a958c;
  --color-text-faint: #6b675f;
  --color-border: #302d29;
  --color-accent: #b8935e;
  --color-accent-dim: #8a7150;

  --font-display: Tahoma, Verdana, Geneva, sans-serif;
  --font-body: Tahoma, Verdana, Geneva, sans-serif;
  --font-mono: 'Courier New', Courier, monospace;

  --container-w: 1180px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 96px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Pozadí celé úvodní stránky (fotka z Nastavení webu) s jemným
   parallax posunem — viz assets/js/main.js. Vrstva je "position: fixed"
   (ne "background-attachment: fixed"), což spolehlivě funguje
   i v mobilních prohlížečích. */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.page-bg img {
  position: absolute;
  top: -8%;
  left: 0;
  width: 100%;
  height: 116%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  will-change: transform;
}
.page-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(18, 17, 16, 0.55);
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

::selection { background: var(--color-accent-dim); color: #fff; }

:focus-visible {
  outline: 1.5px solid var(--color-accent);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* =================================================================
   HEADER / NAV
================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 17, 16, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 18px var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 14px;
}

.site-nav a {
  color: var(--color-text-muted);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}
.site-nav a:hover,
.site-nav a.is-active { color: var(--color-text); }
.site-nav a.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: var(--color-accent);
}

.nav-divider {
  width: 1px; height: 16px;
  background: var(--color-border);
}

.nav-icon { display: inline-flex; color: var(--color-text-muted); }
.nav-icon:hover { color: var(--color-accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 22px; height: 1px; background: var(--color-text);
}

/* =================================================================
   HERO CAROUSEL (index.php)
================================================================= */
.hero-carousel {
  position: relative;
  height: 86vh;
  min-height: 480px;
  overflow: hidden;
  background: #000;
}

.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hero-slide.is-active { opacity: 1; }

.hero-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  animation: kenburns 16s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

.hero-carousel::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(18,17,16,0.15) 0%, rgba(18,17,16,0.05) 40%, rgba(18,17,16,0.85) 100%);
  pointer-events: none;
}

.hero-caption {
  position: absolute;
  left: 0; right: 0; bottom: var(--space-4);
  z-index: 2;
  text-align: center;
  padding: 0 var(--space-3);
}

.hero-caption .eyebrow { display: block; margin-bottom: var(--space-1); }

.hero-caption h1 {
  font-size: clamp(28px, 5vw, 52px);
  color: #fff;
}

.hero-caption .coords {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-top: var(--space-1);
}

.hero-dots {
  position: absolute;
  bottom: var(--space-2);
  right: var(--space-3);
  z-index: 2;
  display: flex; gap: 8px;
}
.hero-dots button {
  width: 6px; height: 6px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.35);
  cursor: pointer; padding: 0;
  transition: background 0.2s, transform 0.2s;
}
.hero-dots button.is-active { background: var(--color-accent); transform: scale(1.4); }

.hero-empty {
  height: 60vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: var(--space-3);
}

/* =================================================================
   SECTIONS obecně
================================================================= */
section { padding: var(--space-6) 0; }
.section-head {
  max-width: 640px;
  margin: 0 0 var(--space-4);
}
.section-head h2 { font-size: clamp(24px, 3vw, 34px); margin-top: var(--space-1); }

.about-block {
  max-width: 680px;
  font-size: 17px;
  color: var(--color-text-muted);
  font-weight: 400;
}
.about-block p { margin: 0 0 1em; }

/* =================================================================
   TRIP STRIP (na homepage) + TRIP GRID (trip.php)
================================================================= */
.trip-strip {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  scrollbar-width: thin;
}
.trip-strip::-webkit-scrollbar { height: 4px; }
.trip-strip::-webkit-scrollbar-thumb { background: var(--color-border); }

.trip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-4) var(--space-3);
}

.plate {
  flex: 0 0 280px;
  scroll-snap-align: start;
}
.trip-strip .plate { flex: 0 0 280px; }

.plate__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
}
.plate__frame img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1);
  transition: transform 0.6s ease, filter 0.6s ease;
}
.plate:hover .plate__frame img {
  transform: scale(1.05);
  filter: grayscale(0.4);
}
.plate__frame .no-photo {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-faint); font-family: var(--font-mono); font-size: 12px;
}

.plate__label {
  padding: var(--space-2) 2px 0;
  border-bottom: 1px solid transparent;
}
.plate__label h3 {
  font-size: 18px;
  margin-bottom: 2px;
}
.plate__label .place {
  color: var(--color-text-muted);
  font-size: 13px;
}
.plate__label .coords {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-accent);
  margin-top: 6px;
  letter-spacing: 0.02em;
}

/* =================================================================
   TRIP DETAIL (galerie jedné lokace)
================================================================= */
.trip-hero {
  padding: var(--space-5) 0 var(--space-3);
  border-bottom: 1px solid var(--color-border);
}
.trip-hero h1 { font-size: clamp(30px, 4.5vw, 48px); margin-top: var(--space-1); }
.trip-hero .place { color: var(--color-text-muted); margin-top: var(--space-1); font-size: 16px; }
.trip-hero .meta-row {
  display: flex; flex-wrap: wrap; gap: var(--space-3);
  align-items: center;
  margin-top: var(--space-2);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-text-faint);
}
.trip-hero .meta-row a {
  color: var(--color-accent);
  border-bottom: 1px solid var(--color-accent-dim);
}
.trip-hero .description {
  max-width: 640px;
  margin-top: var(--space-3);
  color: var(--color-text-muted);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.photo-grid figure {
  margin: 0;
  overflow: hidden;
  background: var(--color-bg-raised);
  cursor: zoom-in;
}
.photo-grid img {
  width: 100%; height: 100%; object-fit: cover;
  aspect-ratio: 3/2;
  filter: grayscale(1);
  transition: transform 0.5s ease;
}
.photo-grid figure:hover img { transform: scale(1.04); }

.empty-note {
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: var(--space-4) 0;
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10,10,9,0.96);
  display: none;
  align-items: center; justify-content: center;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 90vw; max-height: 84vh;
  object-fit: contain;
  filter: grayscale(1);
}
.lightbox__close, .lightbox__prev, .lightbox__next {
  position: absolute;
  background: none; border: none; color: var(--color-text);
  cursor: pointer; font-family: var(--font-mono); font-size: 14px;
  padding: var(--space-2);
}
.lightbox__close { top: var(--space-2); right: var(--space-2); }
.lightbox__prev { left: var(--space-2); top: 50%; transform: translateY(-50%); font-size: 28px; }
.lightbox__next { right: var(--space-2); top: 50%; transform: translateY(-50%); font-size: 28px; }

/* =================================================================
   SOUKROMÁ SEKCE
================================================================= */
.protected-gate {
  min-height: 60vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
}
.protected-gate form {
  display: flex; flex-direction: column; gap: var(--space-3);
  width: 100%; max-width: 320px;
}
.protected-gate input[type="password"] {
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 14px;
}
.protected-content { max-width: 680px; }

/* =================================================================
   BUTTONS
================================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text);
  background: transparent;
  border: 1px solid var(--color-border);
  padding: 12px 22px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn--accent {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.error-msg {
  color: #d98c6a;
  font-family: var(--font-mono);
  font-size: 13px;
}

/* =================================================================
   FOOTER
================================================================= */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-4) 0;
}
.site-footer__inner {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--space-3);
  display: flex; flex-wrap: wrap; gap: var(--space-2);
  justify-content: space-between; align-items: center;
  color: var(--color-text-faint);
  font-size: 13px;
}
.site-footer__links a:hover { color: var(--color-accent); }
.site-footer .dot { margin: 0 6px; }

/* =================================================================
   RESPONSIVE
================================================================= */
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed; top: 63px; left: 0; right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-3);
    gap: var(--space-2);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
  }
  .site-nav.is-open {
    opacity: 1; transform: translateY(0); pointer-events: auto;
  }
  .nav-divider { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide img { animation: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
