/* ============================================================
   Přemyslovci audioguide — scrollytelling microsites
   Shared stylesheet. Per-spine accent via --spine-accent on <html>.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Source+Serif+Pro:wght@400;600&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #0a0a0c;
  --bg-alt: #111118;
  --text: #e8e2db;
  --muted: rgba(232, 226, 219, 0.55);
  --rule: rgba(232, 226, 219, 0.12);
  --accent: var(--spine-accent, #c9a55c);
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body: 'Source Serif Pro', Georgia, serif;
  --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
  --max-content: 1220px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 40px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  font-feature-settings: "liga", "kern";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); }

.container {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 32px;
}

/* ------------------------------------------------------------
   Top site bar — thin, sticky, gives context when scrolled
   ------------------------------------------------------------ */
.site-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 16px 32px;
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(10,10,12,0.95) 0%, rgba(10,10,12,0) 100%);
  backdrop-filter: blur(8px);
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.site-bar a {
  color: var(--muted);
  text-decoration: none;
  pointer-events: auto;
  transition: color 0.3s;
}

.site-bar a:hover { color: var(--accent); }

/* ------------------------------------------------------------
   Hero — spine letter, title, teze
   ------------------------------------------------------------ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 50%;
  right: -200px;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 60%);
  opacity: 0.08;
  transform: translateY(-50%);
  filter: blur(20px);
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; max-width: 900px; }

.spine-label {
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}

.spine-letter {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(140px, 22vw, 280px);
  font-weight: 400;
  line-height: 0.85;
  color: var(--accent);
  letter-spacing: -0.05em;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(44px, 6vw, 76px);
  margin: 32px 0 48px;
  max-width: 18ch;
  font-weight: 500;
}

.teze {
  font-family: var(--font-display);
  font-size: clamp(21px, 2.2vw, 26px);
  font-style: italic;
  line-height: 1.55;
  max-width: 58ch;
  color: var(--text);
  border-left: 2px solid var(--accent);
  padding: 8px 0 8px 28px;
  margin: 40px 0;
  font-weight: 400;
}

.tone-line {
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 24px;
}

.tone-line strong {
  color: var(--accent);
  font-weight: 500;
}

.tour-nav {
  font-family: var(--font-ui);
  font-size: 13px;
  margin-top: 64px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  max-width: 780px;
}

.tour-nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s;
  padding: 4px 0;
}

.tour-nav a::before {
  content: "0" counter(stop-counter) " · ";
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  counter-increment: stop-counter;
}

.tour-nav .exc-link::before {
  content: "★ ";
  counter-increment: none;
}

.tour-nav a:hover { color: var(--accent); }

.hero .scroll-hint { display: none; }

/* ------------------------------------------------------------
   Stop sections
   ------------------------------------------------------------ */
.tour { counter-reset: stop-counter; }

.stop {
  padding: 120px 0;
  border-top: 1px solid var(--rule);
  position: relative;
}

.stop-meta {
  display: flex;
  align-items: baseline;
  gap: 28px;
  margin-bottom: 40px;
  font-family: var(--font-ui);
  flex-wrap: wrap;
}

.stop-number {
  font-family: var(--font-display);
  font-size: clamp(56px, 8vw, 88px);
  color: var(--accent);
  line-height: 0.85;
  font-weight: 400;
}

.stop-location {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.stop h2 {
  font-size: clamp(36px, 4.2vw, 56px);
  margin-bottom: 48px;
  max-width: 22ch;
}

.stop-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 72px;
}

.stop-text {
  font-size: 19px;
  line-height: 1.75;
  max-width: 68ch;
}

.stop-text .lead {
  font-family: var(--font-display);
  font-size: clamp(23px, 2.5vw, 30px);
  line-height: 1.4;
  font-style: italic;
  margin-bottom: 36px;
  padding: 0 0 28px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--text);
}

.stop-text .lead::first-letter {
  font-family: var(--font-display);
  font-size: 2.4em;
  float: left;
  line-height: 0.9;
  padding: 6px 12px 0 0;
  color: var(--accent);
  font-style: normal;
  font-weight: 500;
}

.stop-text p + p { margin-top: 0.2em; }

.pull {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3em;
  color: var(--accent);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 24px 0;
  margin: 36px 0;
  line-height: 1.4;
}

/* ------------------------------------------------------------
   Exhibits sidebar
   ------------------------------------------------------------ */
.exhibits {
  font-family: var(--font-ui);
  font-size: 14px;
  align-self: start;
  position: sticky;
  top: 80px;
}

.exhibits-title {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  font-weight: 600;
}

.exhibit {
  border-left: 1px solid var(--rule);
  padding: 2px 0 2px 18px;
  margin-bottom: 24px;
  transition: border-color 0.4s;
}

.exhibit:hover { border-color: var(--accent); }

.exhibit .title {
  color: var(--text);
  font-weight: 500;
  line-height: 1.35;
  margin-bottom: 6px;
  font-size: 14px;
}

.exhibit .loc {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: 500;
}

.exhibit .note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  font-style: italic;
}

/* ------------------------------------------------------------
   Exceptional stops — tinted background, different tag
   ------------------------------------------------------------ */
.stop-exc {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 40%, var(--bg-alt) 60%, var(--bg) 100%);
}

.stop-exc .stop-location::before {
  content: "★ Mimořádné zastavení · ";
  color: var(--accent);
  font-weight: 600;
}

/* ------------------------------------------------------------
   Reveal animation — IntersectionObserver-driven
   ------------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.1s cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal.delay-1 { transition-delay: 0.15s; }
.reveal.delay-2 { transition-delay: 0.3s; }

/* ------------------------------------------------------------
   Progress indicator — fixed left dots
   ------------------------------------------------------------ */
.progress-nav {
  position: fixed;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 40;
  font-family: var(--font-ui);
}

.progress-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.progress-nav .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rule);
  transition: background 0.3s, transform 0.3s;
  flex-shrink: 0;
}

.progress-nav a .label {
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.3s, transform 0.3s;
  white-space: nowrap;
}

.progress-nav a:hover .label,
.progress-nav a.active .label {
  opacity: 1;
  transform: translateX(0);
}

.progress-nav a:hover .dot,
.progress-nav a.active .dot {
  background: var(--accent);
  transform: scale(1.4);
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.site-footer {
  padding: 80px 0 48px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 1.8;
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
  margin: 0 14px;
}

.site-footer a:hover { text-decoration: underline; }

.other-spines {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.other-spines a {
  font-family: var(--font-display);
  font-size: 20px;
  font-style: italic;
  color: var(--muted);
}

.other-spines a:hover { color: var(--accent); }

/* ------------------------------------------------------------
   Index page
   ------------------------------------------------------------ */
.index-hero {
  padding: 120px 0 60px;
  text-align: center;
}

.index-hero .eyebrow {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}

.index-hero h1 {
  font-size: clamp(44px, 7vw, 88px);
  margin-bottom: 32px;
  font-weight: 500;
}

.index-hero .lede {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.55;
  max-width: 56ch;
  margin: 0 auto;
  color: var(--muted);
}

.spines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  padding: 60px 0 120px;
}

.spine-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  padding: 48px 32px 40px;
  border: 1px solid var(--rule);
  background: var(--bg-alt);
  transition: border-color 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
              background 0.4s;
  position: relative;
  overflow: hidden;
}

.spine-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--card-accent, #c9a55c);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.spine-card:hover {
  border-color: var(--card-accent);
  transform: translateY(-6px);
}

.spine-card:hover::before { transform: scaleX(1); }

.spine-card .letter {
  display: block;
  font-family: var(--font-display);
  font-size: 96px;
  line-height: 0.8;
  color: var(--card-accent);
  font-weight: 400;
  margin-bottom: 8px;
}

.spine-card .eyebrow {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.spine-card h3 {
  font-size: 30px;
  margin-bottom: 20px;
  color: var(--text);
  line-height: 1.15;
}

.spine-card p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 0;
}

.spine-card .stops-count {
  display: block;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

.index-context {
  padding: 60px 0 100px;
  max-width: 720px;
  margin: 0 auto;
}

.index-context h2 {
  font-size: 32px;
  margin-bottom: 24px;
}

.index-context p {
  font-size: 17px;
  line-height: 1.75;
  margin-bottom: 1.2em;
  color: var(--muted);
}

.index-context p strong {
  color: var(--text);
  font-weight: 500;
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 960px) {
  .stop-body {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .exhibits {
    position: static;
    border-top: 1px solid var(--rule);
    padding-top: 32px;
  }

  .progress-nav { display: none; }

  .site-bar { padding: 12px 20px; font-size: 11px; }

  .container { padding: 0 20px; }

  .hero { padding: 80px 0 60px; }

  .stop { padding: 80px 0; }
}

@media (max-width: 540px) {
  body { font-size: 17px; }
  .stop-text { font-size: 18px; }
  .stop-text .lead { font-size: 22px; }
}
