/* JiriWendl.cz – společný styl */
:root {
  color-scheme: light dark;
  --bg: #f7f8f7;
  --surface: #ffffff;
  --text: #1c2321;
  --muted: #5d6763;
  --border: #dfe4e1;
  --accent: #1b6e53;
  --accent-hover: #155841;
  --accent-soft: #e3f1eb;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 8px 24px -12px rgba(0, 0, 0, .15);
  --radius: 14px;
  --maxw: 68rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111615;
    --surface: #1a2220;
    --text: #e6ebe8;
    --muted: #9aa6a1;
    --border: #2a3532;
    --accent: #4fb892;
    --accent-hover: #6cc9a6;
    --accent-soft: #1d3a30;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: 1.5rem; margin-top: 2.2rem; }
main > h2:first-child { margin-top: 0; }
h3 { font-size: 1.15rem; margin-top: 1.6rem; }
p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li + li { margin-top: .25em; }
code, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; background: var(--accent-soft); padding: .1em .35em; border-radius: 5px; }
.wrap { width: min(100% - 2rem, var(--maxw)); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .5rem 1rem; }
.skip:focus { left: 1rem; z-index: 100; }

/* Hlavička */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 3.75rem; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); display: inline-flex; align-items: center; gap: .55rem; }
.brand:hover { text-decoration: none; color: var(--accent); }
.brand svg { width: 28px; height: 28px; }
.nav { margin-left: auto; display: flex; gap: .25rem; }
.nav a { color: var(--muted); padding: .45rem .8rem; border-radius: 999px; font-weight: 500; }
.nav a:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }

main { flex: 1; padding-block: 2.5rem 4rem; }

/* Hero */
.hero { padding-block: 2rem 1rem; max-width: 46rem; }
.hero p { font-size: 1.15rem; color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 600; color: var(--accent); margin-bottom: .6rem; }

/* Karty */
.grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); margin-bottom: 1rem; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.35rem 1.4rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .5rem;
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card h3 { margin: 0; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); }
.card .more { margin-top: auto; font-weight: 600; padding-top: .5rem; }
.card .more::after { content: " \2192"; }
.card-link { color: inherit; display: contents; }
.card-link:hover { text-decoration: none; }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: .15rem .6rem; border-radius: 999px; align-self: flex-start; }

/* Stránka programu */
.page-head { max-width: 46rem; margin-bottom: 1.5rem; }
.page-head .lead { font-size: 1.1rem; color: var(--muted); }
.cols { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 60rem) { .cols { grid-template-columns: minmax(0, 1.6fr) minmax(16rem, 1fr); align-items: start; } }
.aside { position: sticky; top: 5rem; display: flex; flex-direction: column; gap: 1rem; }
.download-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.4rem; box-shadow: var(--shadow); }
.download-box dl { display: grid; grid-template-columns: auto 1fr; gap: .3rem .9rem; margin: 0 0 1.1rem; font-size: .95rem; }
.download-box dt { color: var(--muted); }
.download-box dd { margin: 0; font-weight: 600; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.3rem; border-radius: 10px; font-weight: 600; color: #fff !important;
  background: var(--accent); text-decoration: none !important; transition: background .15s ease;
}
.btn:hover { background: var(--accent-hover); }
.btn.block { width: 100%; }
.btn svg { width: 1.1em; height: 1.1em; }
.note { font-size: .9rem; color: var(--muted); margin-top: .8rem; }

.shots { display: flex; flex-wrap: wrap; gap: .9rem; margin: 1.5rem 0; }
.shots a { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.shots img { max-height: 180px; width: auto; }
.shots figcaption { font-size: .85rem; color: var(--muted); padding: .35rem .6rem; }
figure { margin: 1.2rem 0; }
figure img { border-radius: 10px; border: 1px solid var(--border); }
figcaption { font-size: .9rem; color: var(--muted); margin-top: .4rem; }

.changelog { margin-top: 2.5rem; }
.changelog h3 { font-size: 1rem; margin: 1.4rem 0 .4rem; display: flex; gap: .7rem; align-items: baseline; }
.changelog h3 time { font-weight: 400; color: var(--muted); font-size: .9rem; }
.changelog ul { margin-bottom: 0; }
.changelog cite { color: var(--muted); font-size: .9rem; }

dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 95vw; max-height: 95vh; }
dialog.lightbox::backdrop { background: rgba(0, 0, 0, .75); backdrop-filter: blur(4px); }
dialog.lightbox img { max-width: 95vw; max-height: 90vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); cursor: zoom-out; }

/* Kontakt */
.contact { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); max-width: 46rem; }
.contact .card h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.contact .card a { font-size: 1.1rem; font-weight: 600; }

/* Patička */
.site-footer { border-top: 1px solid var(--border); padding: 1.6rem 0; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }

@media (max-width: 40rem) {
  body { font-size: 16px; }
  .site-header .wrap { gap: .75rem; }
  .nav a { padding: .4rem .6rem; }
  .brand span { display: none; }
}

/* JK BMS Monitor */
.app-title { display: flex; align-items: center; gap: 1.1rem; }
.app-icon { width: 72px; height: 72px; border-radius: 18px; background: var(--accent); display: grid; place-items: center; flex: none; box-shadow: var(--shadow); }
.app-icon svg { width: 44px; height: 44px; }
