/* Plondude — společný styl pro všechny stránky */

:root {
  --bg: #e9eeeb;
  --bg-alt: #d9e1dd;
  --bg-dark: #1e2a26;
  --text: #171f1c;
  --text-soft: #63706b;
  --text-invert: #e9eeeb;
  --accent: #8f4a28;
  --accent-2: #3d6f66;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --rhythm: 76px;
  --gap: 24px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  overflow-x: hidden;
}

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

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration-thickness: 2px; }

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

/* ---------- mřížka ---------- */

.grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gap);
}

.band { padding: var(--rhythm) 0; }
.band--alt { background: var(--bg-alt); }
.band--dark { background: var(--bg-dark); color: var(--text-invert); }

/* ---------- hlavička a navigace ---------- */

.masthead { padding: 26px 0 18px; }

.masthead .grid { align-items: baseline; row-gap: 12px; }

.sitename {
  grid-column: 2 / 6;
  font-size: 21px;
  letter-spacing: 0.06em;
  margin: 0;
  font-weight: normal;
}
.sitename a { color: var(--text); text-decoration: none; }
.sitename a:hover { color: var(--accent); }

.masthead nav { grid-column: 6 / 13; }

.navlist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0;
  font-family: var(--sans);
  font-size: 13px;
}
.navlist li + li { border-left: 1px solid rgba(99, 112, 107, 0.45); }
.navlist a {
  display: inline-block;
  padding: 2px 12px;
  color: var(--text-soft);
  text-decoration: none;
}
.navlist a:hover { color: var(--accent); }
.navlist a[aria-current="page"] {
  color: var(--text);
  border-bottom: 2px solid var(--accent);
}

.masthead .rule-thin {
  grid-column: 2 / 13;
  height: 1px;
  background: rgba(99, 112, 107, 0.4);
  margin-top: 14px;
}

/* ---------- hřbet knihy ---------- */

.spine {
  grid-column: 1 / 2;
  grid-row: 1 / -1;
  width: 18px;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--accent) 0 3px,
    transparent 3px 17px
  );
}

/* ---------- úvodní blok ---------- */

.hero { padding: 52px 0 var(--rhythm); }
.hero .grid { row-gap: 0; }

.hero h1 {
  grid-column: 2 / 11;
  margin: 0;
  font-weight: normal;
  font-size: 46px;
  line-height: 1.16;
  letter-spacing: -0.01em;
}
.hero h1 .line { display: block; }

.double-rule {
  grid-column: 2 / 9;
  margin: 26px 0 24px;
  height: 5px;
  border-top: 1px solid var(--accent);
  border-bottom: 1px solid rgba(61, 111, 102, 0.7);
}

.hero .lead { grid-column: 2 / 9; }

.lead {
  font-size: 21px;
  line-height: 1.6;
  margin: 0 0 1.1em;
}

/* ---------- obrázky ---------- */

.figure-main {
  grid-column: 7 / 13;
  margin: 34px 0 0;
}
.figure-main img { width: 100%; }

figcaption {
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-soft);
  margin-top: 9px;
  text-align: left;
  max-width: 46ch;
}

/* ---------- rubriky sekcí ---------- */

.rubric {
  grid-column: 1 / 13;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--accent-2);
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(61, 111, 102, 0.45);
  margin-bottom: 30px;
}
.band--dark .rubric {
  color: #9db8b0;
  border-bottom-color: rgba(157, 184, 176, 0.35);
}

/* ---------- text ---------- */

h2 {
  grid-column: 2 / 10;
  font-weight: normal;
  font-size: 31px;
  line-height: 1.24;
  margin: 0 0 0.55em;
}

h3 {
  grid-column: 2 / 9;
  font-style: italic;
  font-weight: normal;
  font-size: 22px;
  margin: 1.4em 0 0.35em;
}

.text { grid-column: 2 / 9; }
.text p { margin: 0 0 1.15em; }
.text p:last-child { margin-bottom: 0; }
.text > h3:first-child { margin-top: 0; }

.wide { grid-column: 2 / 11; }

.marks {
  grid-column: 2 / 9;
  list-style: none;
  margin: 0.2em 0 1.2em;
  padding: 0;
}
.marks li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 0.7em;
}
.marks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 14px;
  height: 2px;
  background: var(--accent);
}
.band--dark .marks li::before { background: #c07a52; }

.numbered {
  grid-column: 2 / 9;
  margin: 0.2em 0 1.2em;
  padding-left: 1.2em;
}
.numbered li { margin-bottom: 0.7em; padding-left: 0.3em; }
.numbered li::marker { color: var(--accent-2); font-family: var(--sans); font-size: 13px; }

.note {
  grid-column: 2 / 9;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.6;
}

/* ---------- typografický oddělovač ---------- */

.divider {
  grid-column: 1 / 13;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 40px 0;
}
.divider span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--accent);
}
.band--dark .divider span { background: #c07a52; }

/* ---------- kontrastní sekce s detailem ---------- */

.band--dark a { color: #d59a72; }

.figure-detail {
  grid-column: 2 / 7;
  margin: 0;
}
.figure-detail img { width: 100%; }
.band--dark figcaption { color: #9db8b0; }

.detail-text { grid-column: 8 / 13; }
.detail-text h2 { grid-column: auto; margin-top: 0; font-size: 29px; }
.detail-text p { margin: 0 0 1.1em; }
.detail-text .marks { grid-column: auto; }

/* ---------- kontakt ---------- */

.contact-box { grid-column: 2 / 9; }
.contact-box p { margin: 0 0 0.9em; }
.mail {
  font-size: 21px;
  display: inline-block;
}

/* ---------- stránka O projektu: buřička ---------- */

.dropcap::first-letter {
  float: left;
  font-size: 66px;
  line-height: 0.82;
  padding: 6px 10px 0 0;
  color: var(--accent);
}

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

.site-footer {
  background: var(--bg-alt);
  padding: 54px 0 46px;
  margin-top: 0;
}
.footer-inner {
  grid-column: 1 / 13;
  text-align: center;
}
.footer-name {
  font-size: 19px;
  letter-spacing: 0.08em;
  margin: 0 0 16px;
}
.footer-nav ul {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  font-family: var(--sans);
  font-size: 13px;
}
.footer-nav li + li { border-left: 1px solid rgba(99, 112, 107, 0.45); }
.footer-nav a {
  display: inline-block;
  padding: 2px 12px;
  color: var(--text-soft);
  text-decoration: none;
}
.footer-nav a:hover { color: var(--accent); }
.footer-mail { margin: 0 0 14px; }
.footer-note {
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-soft);
  max-width: 62ch;
  margin: 0 auto;
}

/* ---------- responzivita ---------- */

@media (max-width: 1000px) {
  .hero h1 { font-size: 38px; }
  h2 { font-size: 27px; grid-column: 2 / 12; }
  .figure-main { grid-column: 5 / 13; }
  .figure-detail { grid-column: 2 / 8; }
  .detail-text { grid-column: 8 / 13; }
  .text, .marks, .numbered, .note, .contact-box, h3 { grid-column: 2 / 12; }
  .hero .lead, .double-rule { grid-column: 2 / 12; }
}

@media (max-width: 720px) {
  :root { --rhythm: 46px; --gap: 0px; }

  body { font-size: 17px; }

  .grid {
    grid-template-columns: 1fr;
    padding: 0 18px;
  }

  .sitename,
  .masthead nav,
  .masthead .rule-thin,
  .hero h1,
  .double-rule,
  .hero .lead,
  .figure-main,
  .rubric,
  h2, h3,
  .text, .marks, .numbered, .note,
  .figure-detail, .detail-text,
  .contact-box, .divider, .footer-inner,
  .wide {
    grid-column: 1 / -1;
  }

  .spine {
    grid-column: 1 / -1;
    grid-row: auto;
    width: 100%;
    height: 3px;
    margin-bottom: 26px;
    background-image: repeating-linear-gradient(
      to right,
      var(--accent) 0 14px,
      transparent 14px 28px
    );
  }

  .navlist { justify-content: flex-start; }
  .navlist li:first-child a { padding-left: 0; }

  .hero { padding: 30px 0 var(--rhythm); }
  .hero h1 { font-size: 31px; }
  .lead { font-size: 19px; }
  h2 { font-size: 24px; }
  h3 { font-size: 20px; }

  .figure-main { margin-top: 28px; }
  .figure-detail { margin-bottom: 26px; }
  .detail-text h2 { font-size: 24px; }

  .divider { margin: 30px 0; }
  .dropcap::first-letter { font-size: 52px; }
}
