/* Flabudi — fresková malba a nástěnná tvorba */

:root {
  --bg: #f7f2e2;
  --bg-alt: #ede5cd;
  --bg-dark: #17191a;
  --ink: #1b1a16;
  --ink-soft: #756f5c;
  --ink-invert: #f7f2e2;
  --accent: #1f7d78;
  --accent-2: #a8721c;
  --serif: Georgia, 'Times New Roman', Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --gap: 24px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  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; }
a:hover { text-decoration-thickness: 2px; }

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

/* ---------- grid ---------- */

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

.section { padding: 32px 0; }
.section--tint { background: var(--bg-alt); padding: 48px 0; }
.section--dark {
  background: var(--bg-dark);
  color: var(--ink-invert);
  padding: 64px 0;
}
.section--dark h2, .section--dark h3 { color: var(--ink-invert); }
.section--dark a { color: #8fd0cb; }
.section--dark .caption { color: #b6b09a; }

/* text column: 6 columns, every third block shifted right by 3 */
.col { grid-column: 1 / span 6; }
.col--shift { grid-column: 4 / span 6; }
.col--wide { grid-column: 1 / span 8; }

/* ---------- typography ---------- */

h1, h2, h3 { font-weight: 400; margin: 0; }

h1 {
  font-size: clamp(34px, 6.2vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.015em;
}

h2 {
  font-size: clamp(23px, 2.6vw, 31px);
  line-height: 1.22;
  margin-bottom: 18px;
}

h3 {
  font-style: italic;
  font-size: 21px;
  line-height: 1.3;
  margin: 28px 0 12px;
}

p { margin: 0 0 20px; }
p:last-child { margin-bottom: 0; }

.lead { font-size: 20px; }

.caption {
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.num {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--accent-2);
  display: block;
  margin-bottom: 10px;
}

.rule {
  height: 1px;
  width: 34%;
  max-width: 190px;
  background: var(--accent);
  border: 0;
  margin: 0 0 22px;
}
.section--dark .rule { background: #8fd0cb; }

/* ---------- header / nav ---------- */

.site-head { padding-top: 26px; }

.site-nav {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 30px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.site-nav .brand {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  margin-right: 12px;
}

.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.site-nav a[aria-current="page"] { color: var(--accent); }

.nav-rule {
  grid-column: 1 / span 5;
  height: 1px;
  background: var(--accent);
  margin: 18px 0 0;
  border: 0;
}

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

.hero { padding: 56px 0 32px; }

.hero h1 {
  grid-column: 1 / span 7;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  column-gap: var(--gap);
}
.hero h1 .l1 { grid-column: 3 / -1; }
.hero h1 .l2 { grid-column: 1 / -1; }

.topics {
  grid-column: 10 / -1;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-soft);
  border-top: 1px solid rgba(117, 111, 92, 0.45);
}
.topics li {
  padding: 9px 0;
  border-bottom: 1px solid rgba(117, 111, 92, 0.45);
}

.hero-intro { grid-column: 1 / span 6; margin-top: 40px; }

/* ---------- main image ---------- */

.figure-main {
  grid-column: 8 / -1;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--accent-2);
}
.figure-main img { width: 100%; }

.figure-main-caption {
  grid-column: 1 / span 3;
  align-self: end;
  margin: 0 0 6px;
}

.media-row { align-items: end; padding-top: 8px; }

/* ---------- detail image in dark section ---------- */

.figure-detail {
  grid-column: 1 / span 4;
  margin: 0;
}
.figure-detail img { width: 100%; }
.figure-detail figcaption { margin-top: 10px; }

.dark-text { grid-column: 6 / span 6; }

/* ---------- lists ---------- */

ul.list, ol.list { margin: 0 0 20px; padding-left: 0; list-style: none; }
ul.list li, ol.list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 11px;
}
ul.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 10px;
  height: 1px;
  background: var(--accent);
}
ol.list { counter-reset: step; }
ol.list li { padding-left: 30px; }
ol.list li::before {
  counter-increment: step;
  content: counter(step) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--accent-2);
  line-height: 2.5;
}

dl.terms { margin: 0 0 20px; }
dl.terms dt { font-style: italic; margin-top: 16px; }
dl.terms dd { margin: 4px 0 0; }

/* ---------- about-style narrow page ---------- */

.page-head { padding: 48px 0 8px; }
.page-head h1 { grid-column: 1 / span 8; font-size: clamp(30px, 4.4vw, 46px); }
.page-head .caption { grid-column: 1 / span 6; margin-top: 18px; }

.doc { grid-column: 1 / span 6; padding-bottom: 8px; }
.doc section { margin-top: 56px; }
.doc section:first-of-type { margin-top: 40px; }

.doc h2 {
  position: relative;
  padding-left: 40px;
}
.doc h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 24px;
  height: 1px;
  background: var(--accent);
}

/* ---------- contact ---------- */

.contact-block { grid-column: 4 / span 6; }
.contact-block .mail { font-size: 21px; }

/* ---------- footer ---------- */

.site-foot { padding: 64px 0 48px; }

.foot-rule {
  grid-column: 1 / span 5;
  height: 1px;
  background: var(--accent);
  border: 0;
  margin: 0 0 26px;
}

.foot-a { grid-column: 1 / span 5; }
.foot-b { grid-column: 6 / span 3; }
.foot-c { grid-column: 9 / span 4; }

.foot-a .name { font-size: 21px; margin: 0 0 8px; }

.foot-nav { list-style: none; margin: 0; padding: 0; font-family: var(--sans); font-size: 13px; line-height: 1.9; }
.foot-nav a { color: var(--ink); text-decoration: none; }
.foot-nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.foot-c p { margin-bottom: 10px; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  body { font-size: 17px; }
  .wrap { padding: 0 22px; column-gap: 18px; }

  .section { padding: 20px 0; }
  .section--tint { padding: 32px 0; }
  .section--dark { padding: 40px 0; }

  .col, .col--shift, .col--wide,
  .hero-intro, .dark-text, .contact-block,
  .doc, .page-head h1, .page-head .caption { grid-column: 1 / -1; }

  .hero { padding: 36px 0 24px; }
  .hero h1 { grid-column: 1 / -1; grid-template-columns: repeat(6, 1fr); }
  .hero h1 .l1 { grid-column: 2 / -1; }
  .hero h1 .l2 { grid-column: 1 / -1; }

  .topics { grid-column: 1 / -1; margin-top: 30px; }

  .figure-main { grid-column: 1 / -1; max-width: 520px; }
  .figure-main-caption { grid-column: 1 / -1; margin: 12px 0 0; max-width: 520px; }

  .figure-detail { grid-column: 1 / -1; max-width: 420px; margin-bottom: 26px; }

  .doc section { margin-top: 40px; }
  .doc h2 { padding-left: 32px; }
  .doc h2::before { width: 20px; }

  .foot-rule { grid-column: 1 / -1; }
  .foot-a, .foot-b, .foot-c { grid-column: 1 / -1; }
  .foot-b, .foot-c { margin-top: 26px; }
  .site-foot { padding: 40px 0 36px; }
}

@media (max-width: 520px) {
  .hero h1 .l1 { grid-column: 1 / -1; }
  .site-nav { gap: 6px 20px; font-size: 12.5px; }
}
