/* ABCNatal — základní styly
   Poznámky k přístupnosti: veškeré textové kombinace níže mají kontrast >= 4.5:1.
   Nepoužíváme externí fonty ani externí CSS (žádné blokující požadavky třetích stran). */

:root {
  --bg: #fbf9f5;
  --bg-alt: #f2eee5;
  --surface: #ffffff;
  --ink: #1b1a22;          /* na --bg kontrast 15.6:1 */
  --ink-muted: #46424f;    /* na --bg kontrast 8.9:1  */
  --line: #ddd6c8;
  --night: #14131c;
  --night-ink: #eeebf4;    /* na --night kontrast 14.8:1 */
  --night-muted: #c3bed2;  /* na --night kontrast 9.6:1  */
  --accent: #2f2a5e;       /* na --bg kontrast 11.7:1 */
  --accent-soft: #ece9f7;
  --gold: #7a5c14;         /* na --bg kontrast 5.6:1 */
  --focus: #b3452a;
  --radius: 4px;
  --measure: 68ch;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", "Liberation Serif", serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.95rem); margin-top: 2em; }
h3 { font-size: clamp(1.15rem, 1rem + 0.6vw, 1.35rem); margin-top: 1.6em; }

p, ul, ol, dl, table { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.4em; }

a {
  color: var(--accent);
  text-underline-offset: 2px;
}
a:hover { color: var(--focus); }

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

img { max-width: 100%; height: auto; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

/* ---------- rozvržení ---------- */

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.prose { max-width: var(--measure); }

main { display: block; min-height: 50vh; }

.section { padding: 3rem 0; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--night);
  color: var(--night-ink);
  padding: 12px 18px;
  z-index: 100;
}
.skip:focus {
  left: 8px;
  top: 8px;
}

/* ---------- hlavička ---------- */

.site-header {
  background: var(--night);
  color: var(--night-ink);
  border-bottom: 3px solid var(--gold);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--night-ink);
  text-decoration: none;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
}
.brand:hover { color: #ffffff; }
.brand span { color: var(--night-muted); font-size: 0.78rem; font-family: inherit; letter-spacing: 0.14em; text-transform: uppercase; }

.nav {
  margin-left: auto;
}
.nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 0;
  padding: 0;
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  color: var(--night-ink);
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 0.97rem;
}
.nav a:hover,
.nav a:focus-visible { background: #26243a; color: #ffffff; text-decoration: underline; }
.nav a[aria-current="page"] {
  color: #ffffff;
  box-shadow: inset 0 -2px 0 var(--gold);
}

/* ---------- hero ---------- */

.hero {
  background:
    radial-gradient(1100px 420px at 78% -12%, #2b2748 0%, rgba(43, 39, 72, 0) 62%),
    var(--night);
  color: var(--night-ink);
  padding: 3.4rem 0 3rem;
}
.hero h1 { color: #ffffff; max-width: 20ch; }
.hero p { color: var(--night-muted); max-width: 58ch; font-size: 1.08rem; }
.hero .lead { color: #e6e2f2; font-size: 1.15rem; }

/* ---------- karty ---------- */

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  padding: 0;
  margin: 0 0 1em;
  list-style: none;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 20px;
  margin: 0;
}
.card h3 { margin-top: 0; }
.card p { color: var(--ink-muted); margin-bottom: 0; font-size: 0.96rem; }

a.card {
  display: block;
  text-decoration: none;
  color: inherit;
}
a.card:hover,
a.card:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
}
a.card h3 { color: var(--accent); text-decoration: underline; }

.sign-card__dates {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}

.sign-card__glyph {
  font-size: 1.6rem;
  line-height: 1;
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
}

/* ---------- tabulky ---------- */

.table-scroll { overflow-x: auto; }

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.96rem;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
th { background: var(--bg-alt); font-weight: 600; }
caption { text-align: left; color: var(--ink-muted); padding-bottom: 8px; font-size: 0.92rem; }

/* ---------- upozornění / disclaimer ---------- */

.notice {
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  background: var(--surface);
  padding: 16px 18px;
  border-radius: var(--radius);
  margin: 1.6rem 0;
}
.notice p { margin-bottom: 0; }
.notice p + p { margin-top: 0.7em; }
.notice h2, .notice h3 { margin-top: 0; }

.disclaimer {
  /* Povinné sdělení. Nesmí být skryté, zmenšené ani schované do rozbalovacího prvku. */
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 1.8rem 0;
}
.disclaimer p { margin: 0; max-width: var(--measure); }
.disclaimer strong { display: block; margin-bottom: 4px; }

.site-footer .disclaimer {
  background: #1e1c28;
  border-color: #34314a;
  color: var(--night-ink);
}

.todo-legal {
  border: 1px dashed #8a3f1f;
  background: #fdf1ec;
  color: #5f2a12;   /* kontrast na #fdf1ec = 8.4:1 */
  padding: 14px 16px;
  border-radius: var(--radius);
  margin: 0 0 2rem;
  font-size: 0.95rem;
}
.todo-legal p { margin-bottom: 0; }
.todo-legal strong { color: #5f2a12; }

/* ---------- tlačítka ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 2px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover,
.btn:focus-visible { background: #201c46; border-color: #201c46; color: #ffffff; }

.btn--ghost {
  background: transparent;
  color: var(--accent);
}
.btn--ghost:hover,
.btn--ghost:focus-visible { background: var(--accent-soft); color: var(--accent); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 1.5rem 0;
}

/* ---------- formuláře ---------- */

.field { margin-bottom: 1.1rem; max-width: 46ch; }
.field label { display: block; font-weight: 600; margin-bottom: 5px; }
.field .hint { display: block; color: var(--ink-muted); font-size: 0.9rem; margin-bottom: 6px; }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #9b9488;
  border-radius: var(--radius);
}
.field textarea { min-height: 140px; }

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 1rem;
  max-width: var(--measure);
}
.check input {
  margin-top: 4px;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

/* ---------- FAQ ---------- */

.qa { border-top: 1px solid var(--line); padding-top: 1.2rem; margin-top: 1.2rem; }
.qa h3 { margin-top: 0; }

/* ---------- patička ---------- */

.site-footer {
  background: var(--night);
  color: var(--night-ink);
  padding: 2.6rem 0 2rem;
  margin-top: 3.5rem;
  border-top: 3px solid var(--gold);
  font-size: 0.96rem;
}
.site-footer a { color: #cfc8e8; }
.site-footer a:hover { color: #ffffff; }
.site-footer h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ffffff;
  margin: 0 0 0.8em;
}
.footer-cols {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { margin-bottom: 0.45em; }
.footer-cols a { display: inline-block; min-height: 30px; }
.site-footer dl { margin: 0; }
.site-footer dt { color: var(--night-muted); font-size: 0.85rem; }
.site-footer dd { margin: 0 0 0.6em; color: var(--night-ink); }
.footer-legal {
  border-top: 1px solid #34314a;
  margin-top: 2rem;
  padding-top: 1.2rem;
  color: var(--night-muted);
}

/* ---------- lišta souhlasu s cookies ---------- */

.cmp {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 90;
  background: var(--surface);
  border-top: 3px solid var(--accent);
  box-shadow: 0 -6px 24px rgba(20, 19, 28, 0.18);
  padding: 20px 0;
  /* Lišta nesmí zakrýt stránku jako vstupní interstitial — na malých displejích
     je proto výškově omezena a posouvá se uvnitř sebe. */
  max-height: 70vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.cmp[hidden] { display: none; }
.cmp h2 { margin-top: 0; font-size: 1.2rem; }
.cmp p { color: var(--ink); margin-bottom: 1rem; max-width: var(--measure); }

/* Obě tlačítka mají shodnou velikost, kontrast i pozici — odmítnutí nesmí být
   vizuálně potlačeno oproti přijetí. */
.cmp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.cmp-actions .btn { flex: 1 1 220px; }
.cmp-actions .btn--link {
  flex: 1 1 220px;
  border-color: var(--line);
  background: transparent;
  color: var(--accent);
  font-weight: 500;
}
.cmp-actions .btn--link:hover { background: var(--accent-soft); }

.cmp-prefs { margin: 1rem 0 0; }
.cmp-prefs[hidden] { display: none; }
.cmp-prefs fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 0 0 12px;
}
.cmp-prefs legend { font-weight: 600; padding: 0 6px; }
.cmp-prefs .check { margin-bottom: 0.7rem; }
.cmp-prefs .hint { display: block; color: var(--ink-muted); font-size: 0.9rem; }

.cmp-status {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  padding: 12px 14px;
  border-radius: var(--radius);
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav ul { gap: 2px; }
  .nav a { padding: 0 9px; font-size: 0.92rem; }
  .section { padding: 2.2rem 0; }
  .hero { padding: 2.4rem 0 2.2rem; }

  .cmp { max-height: 58vh; padding: 14px 0; }
  .cmp h2 { font-size: 1.05rem; margin-bottom: 0.4em; }
  .cmp p { font-size: 0.94rem; line-height: 1.5; margin-bottom: 0.8rem; }
  .cmp-actions { gap: 8px; }
  .cmp-actions .btn { flex: 1 1 100%; min-height: 46px; padding: 10px 16px; }
}

@media print {
  .site-header, .site-footer, .cmp, .nav { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}
