:root {
  --bg: #ffffff;
  --ink: #000000;
  --ink-soft: #555555;
  --accent: #ff7f00; /* C0 M50 Y100 K0 */
  --side: 200px;     /* logo column */
  --col: 600px;      /* text column */
  --gap: 48px;
  --space: 1.6rem;   /* fixed spacing between images and text */
  --text: 15px;
  --title: 1.75em;   /* 14pt vs. 8pt body in the design */
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: var(--text);
  line-height: 1.35;
  hyphens: manual;
}

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

/* Shared grid: logo column | text column | rest */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: var(--side) minmax(0, var(--col)) 1fr;
  column-gap: var(--gap);
}

/* Header */
.site-header {
  background: var(--accent);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .wrap {
  align-items: center;
  min-height: 52px;
}
.site-title {
  grid-column: 1;
  display: block;
  line-height: 0;
}
.site-title:hover { opacity: 0.7; }
.site-title img {
  height: 20px;
  width: auto;
  max-width: 100%;
}
.site-nav {
  grid-column: 2 / 4;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 3.5rem;
  padding: 0.8rem 0;
  transition: opacity 0.3s;
}
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a:hover,
.site-nav a.active { color: #fff; }
.site-header.idle .site-nav { opacity: 0; }
.site-header.idle .site-nav:focus-within { opacity: 1; }

/* Content column, with the thin "endless" line at its right edge */
main { flex: 1; display: flex; }
main > .wrap { flex: 1; width: 100%; }
.page {
  grid-column: 2;
  padding: 3rem 24px 4rem 0;
  border-right: 1px solid var(--accent);
}

h1, h2, h3, h4 {
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
}
h1 { font-size: var(--title); margin: 0 0 1rem; }
h1:not(:first-child) { margin-top: 3.5rem; }
/* Subheadings: same size as body text */
h2, h3, h4 { font-size: 1em; margin: var(--space) 0 0.5em; }
h2 { margin-top: 2.5rem; }
.page > :first-child { margin-top: 0; }

p, ul, ol, blockquote { margin: 0 0 1em; }

/* Justified body text with hyphenation (lang comes from <html lang>); contacts stay left-aligned */
.page p, .page li { text-align: justify; hyphens: auto; }
.page-kontakty p, .page-kontakty li { text-align: left; hyphens: manual; }

ul, ol { list-style: none; padding: 0; }
li { margin-bottom: 1em; }

img {
  display: block;
  max-width: 100%;
  height: auto;
}
.page img { width: 100%; margin: var(--space) 0; }
.page p:has(> img:only-child) { margin: 0; }

blockquote { margin: var(--space) 0; padding: 0; }
blockquote p { margin: 0; }

.num {
  color: var(--accent);
  font-size: var(--title);
  margin: 0 0 1rem;
}
.num + h3 { margin-top: 0; }

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: var(--space) 0;
}
.gallery p { display: contents; }
.gallery img { margin: 0; aspect-ratio: 4 / 3; object-fit: cover; }
/* Three portrait photos in one row */
.gallery-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-3 img { aspect-ratio: 2 / 3; }

/* Footer */
.site-footer {
  color: var(--ink-soft);
  font-size: 0.85em;
}
.site-footer p { grid-column: 2; margin: 1.5rem 0; }

@media (max-width: 860px) {
  .wrap { grid-template-columns: minmax(0, 1fr); padding: 0 16px; }
  .site-title, .site-nav, .page, .site-footer p { grid-column: 1; }
  .site-title { padding-top: 0.9rem; }
  .site-nav { gap: 0.3rem 1.5rem; padding: 0.6rem 0 0.8rem; }
  .page { padding: 2rem 0 3rem; border-right: 0; }
}

@media (max-width: 560px) {
  .gallery { grid-template-columns: 1fr; }
}

