/* =========================================================
   runner8web — shared stylesheet
   Palette: warm charcoal ink + marigold/saffron accent
   (nods to Indian spiritual/cultural content: marigold, saffron cloth, temple gold)
   Display face: Fraunces (bookish, high-contrast serif — fits "knihy/články/citáty")
   Body face: Inter (quiet, legible, disappears on mobile)
   Signature: a small bookmark-ribbon notch on every card ("card::before")
   ========================================================= */

:root {
  --bg: #0d0c09;
  --bg-alt: #121009;
  --surface: #17130c;
  --surface-2: #1e1810;
  --border: rgba(227, 196, 130, 0.14);
  --border-strong: rgba(227, 196, 130, 0.3);

  --text: #f3ece0;
  --text-dim: #b9ac93;
  --text-faint: #7d745f;

  --gold: #e3b04b;
  --gold-soft: #f0cf8e;
  --gold-deep: #b5812c;
  --terracotta: #c1552e;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 3px;
  --max-w: 1120px;

  --nav-h: 64px;
  --header-bg: rgba(13, 12, 9, 0.88);
}

[data-theme="light"] {
  --bg: #f7f1e2;
  --bg-alt: #f1e7cd;
  --surface: #eee2c3;
  --surface-2: #e6d7b0;
  --border: rgba(110, 82, 33, 0.2);
  --border-strong: rgba(110, 82, 33, 0.38);

  --text: #241f16;
  --text-dim: #5c5341;
  --text-faint: #897f68;

  --gold: #b5812c;
  --gold-soft: #8a5f1e;
  --gold-deep: #6f4c18;
  --terracotta: #a1461f;
  --header-bg: rgba(247, 241, 226, 0.9);
}

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

body {
  margin: 0;
  padding-top: var(--nav-h);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(227,176,75,0.06), transparent 60%);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

::selection { background: var(--gold); color: #1a1610; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.wrap {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ---------- Typography ---------- */

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: 1.15rem; font-family: var(--font-body); font-weight: 600; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

.lede {
  color: var(--text-dim);
  font-size: 1.05rem;
}

p { color: var(--text-dim); }
p strong { color: var(--text); }

.divider {
  border: none;
  border-top: 1px solid var(--border-strong);
  margin: 2.5rem 0;
}

.hero-divider {
  border: none;
  border-top: 1px solid var(--border-strong);
  margin: 1.75rem 0 0;
}

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: #1a1610;
  padding: 0.6rem 1rem;
  z-index: 200;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Header / Nav ---------- */

header.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-strong);
}

.nav-row {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 1.25rem;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}
.brand svg { flex: none; color: var(--gold); }

nav.primary-nav {
  display: flex;
}
nav.primary-nav > ul {
  list-style: none;
  display: flex;
  gap: 1.6rem;
  margin: 0;
  padding: 0;
}
nav.primary-nav a {
  display: inline-block;
  padding: 0.4rem 0.1rem;
  text-decoration: none;
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
nav.primary-nav a:hover { color: var(--gold-soft); }
nav.primary-nav a[aria-current="page"] {
  color: var(--gold-soft);
  border-color: var(--gold);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--gold-soft);
  cursor: pointer;
  flex: none;
}
.theme-toggle:hover { border-color: var(--gold); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  width: 42px;
  height: 38px;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
}

.has-submenu { position: relative; }
.has-submenu > a::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 6px;
  margin-bottom: 2px;
  border-right: 1.75px solid currentColor;
  border-bottom: 1.75px solid currentColor;
  opacity: 1;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  vertical-align: middle;
}
.has-submenu:hover > a::after,
.has-submenu:focus-within > a::after,
.has-submenu.is-expanded > a::after {
  transform: rotate(-135deg);
  margin-bottom: -2px;
}
.submenu {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  padding-top: calc(0.5rem + 10px);
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 170px;
  display: none;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}
.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu { display: block; }
.submenu a {
  display: block;
  padding: 0.5rem 0.7rem;
  text-transform: none;
  font-size: 0.88rem;
  letter-spacing: normal;
  border: none;
}
.submenu a:hover { color: var(--gold-soft); }

@media (max-width: 860px) {
  nav.primary-nav {
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: var(--bg-alt);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    overflow-y: auto;
  }
  nav.primary-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  nav.primary-nav > ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
  }
  nav.primary-nav a {
    padding: 0.95rem 1.25rem;
    width: 100%;
    border-bottom: 1px solid var(--border);
    text-transform: none;
    font-size: 1rem;
  }
  .submenu {
    position: static;
    transform: none;
    display: none;
    border: none;
    background: rgba(0,0,0,0.18);
    min-width: 0;
    margin: 0;
    padding: 0;
  }
  .has-submenu.is-expanded .submenu { display: block; }
  .submenu a { padding-left: 2.25rem; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.3rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--gold);
  color: #1a1610;
}
.btn-primary:hover { background: var(--gold-soft); }
.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-soft); }

/* ---------- Hero ---------- */

.hero {
  padding: clamp(0.5rem, 1.5vw, 1rem) 0 clamp(2.5rem, 6vw, 4rem);
  text-align: center;
}

/* ---------- Cards with bookmark-ribbon signature ---------- */

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem 1.5rem;
  overflow: visible;
  text-decoration: none;
  display: block;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 1.4rem;
  width: 13px;
  height: 20px;
  background: var(--gold);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 74%, 0 100%);
}
a.card:hover, a.card:focus-visible {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.card h3 { margin-top: 0.5rem; }
.card p { margin-bottom: 0; font-size: 0.92rem; }

.card-media {
  margin: -1.6rem -1.5rem 1rem;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--surface-2), var(--bg-alt));
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ---------- Sections ---------- */

section { padding-block: clamp(2.5rem, 6vw, 4rem); }
.hero + section { padding-top: clamp(1rem, 2.5vw, 1.5rem); }
.section-head { max-width: 62ch; margin-bottom: 2rem; }

.tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-soft);
  background: rgba(227,176,75,0.1);
  border: 1px solid rgba(227,176,75,0.25);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius);
}

/* ---------- Accordion (Články) ---------- */

details.article {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  margin-bottom: 0.9rem;
  overflow: hidden;
}
details.article summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
details.article summary::-webkit-details-marker { display: none; }
details.article summary .num {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
}
details.article summary .title {
  flex: 1;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text-dim);
}
details.article summary .chev {
  flex: none;
  width: 8px;
  height: 8px;
  margin-right: 2px;
  border-right: 1.75px solid var(--text-faint);
  border-bottom: 1.75px solid var(--text-faint);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}
details.article[open] summary .chev { transform: rotate(225deg); margin-right: -2px; margin-top: 4px; }
.article-body {
  padding: 1rem 1.4rem 1.4rem;
  border-top: 1px solid var(--border);
}
.article-body h4 { font-family: var(--font-body); color: var(--gold-soft); font-size: 1rem; margin: 1.1rem 0 0.3rem; }

/* ---------- Quotes ---------- */

.quote-group h2 {
  font-size: 1.1rem;
  color: var(--gold-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-body);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
}
ul.quotes { list-style: none; margin: 0; padding: 0; }
ul.quotes li {
  position: relative;
  padding-left: 1.3rem;
  margin-bottom: 0.85rem;
  color: var(--text-dim);
}
ul.quotes li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--gold-soft);
  font-size: 1rem;
  line-height: 1.5;
}
ul.quotes li .attr { color: var(--gold-soft); font-style: italic; }

/* ---------- Media embed frame ---------- */

.embed-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.embed-frame iframe {
  width: 100%;
  border: none;
  display: block;
  height: 720px;
}
@media (max-width: 640px) {
  .embed-frame iframe { height: 90vh; }
}

.note {
  font-size: 0.85rem;
  color: var(--text-faint);
  border-left: 2px solid var(--border-strong);
  padding-left: 0.8rem;
  margin-top: 0.8rem;
}

/* ---------- Footer ---------- */

footer.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 2.5rem 0;
  color: var(--text-faint);
  font-size: 0.85rem;
}
footer.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}
footer.site-footer a { color: var(--text-dim); text-decoration: none; }
footer.site-footer a:hover { color: var(--gold-soft); }
