/* Shared look of the three sites; mirrors the former Textpattern "katka" stylesheet, made responsive. */
:root {
  --pink: #df9dc6;
  --pink-strong: #dd41a3;
  --pink-hot: #ff5e99;
  --mauve: #7f6770;
  --text: #6f6f6f;
  --muted: #8f8f8f;
  --line: #cfcfcf;
  --bg: #fff;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: Helvetica, Arial, sans-serif;
  --max: 960px;
}
* { box-sizing: border-box; }
html { overflow-y: scroll; }
body { margin: 0; background: var(--bg); color: var(--text); font: 11pt var(--sans); }
img { max-width: 100%; height: auto; border: 0; }
a { color: var(--pink); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--pink-hot); color: #fff; text-shadow: none; }

.container { max-width: var(--max); margin: 0 auto; }
.site-header { text-align: center; margin: 1.5em 0; }

.site-nav {
  position: relative;
  min-height: 36px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  text-align: center;
  & ul { margin: 0 auto; padding: 0; list-style: none; }
  & li { display: inline; margin: 0 1em; }
  & li a {
    color: var(--mauve);
    font: 1.1em var(--serif);
    letter-spacing: .15em;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px var(--line);
  }
  & li a:hover { color: var(--pink); text-decoration: none; }
  & .social { position: absolute; right: 0; top: 26px; }
  & .social:hover { top: 6px; }
  & .social img { display: block; }
}

main { margin: 1.5em 0; }
main article { margin: 0 170px; }
article h1, article h2, article h3, article h4, article h5, article h6 {
  font-family: var(--serif);
  text-transform: uppercase;
  text-shadow: 1px 1px 2px var(--line);
}
article h1 { font-size: 1.4em; }
article h2 { font-size: 1.2em; }
article h3 { font-size: 1.1em; }
article h4, article h5, article h6 { font-size: 1em; }
th.right, td.right { text-align: right; vertical-align: top; }

/* Gallery index: tiles with the title on a grey bar below the cover. Columns share the
   width, so tiles scale with the window; kaf.cz shows 4 per row, then 2 + 2, then one per row. */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 0 10px;
  & a {
    display: block;
    background: var(--text);
    color: #fff;
    font: .9em var(--serif);
    letter-spacing: .15em;
    text-align: center;
    text-decoration: none;
  }
  & a:hover { box-shadow: 0 0 4px var(--text); color: var(--pink); }
  & img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
  & span { display: block; padding: .5em 0; text-transform: uppercase; }
}
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

/* Gallery page: square 150 px thumbnails, six per row like the old sites. */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 150px);
  gap: 10px;
  justify-content: center;
  & a { display: block; }
  & img { display: block; width: 150px; height: 150px; object-fit: cover; }
}
#gallery { margin: 0 10px; }

.site-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 20px;
  margin: 1.5em 0 0;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: url("/inc/logo.bg.png") top right no-repeat;
  color: var(--muted);
  & h4 { margin: .5em 0; font: 1em var(--serif); text-transform: uppercase; text-shadow: 1px 1px 2px var(--line); }
  & ul { margin: 0; padding: 0; list-style: none; }
  & li { margin-left: 1.5em; }
  & li a { color: var(--mauve); font: .9em var(--serif); letter-spacing: .15em; text-transform: uppercase; }
  & li a:hover { color: var(--pink); text-decoration: none; }
  & p, & th, & td { font-size: .9em; }
  & p { margin: 0; padding: .5em 0; }
  & th { text-align: right; vertical-align: top; }
  & .copyright { grid-column: 1 / -1; text-align: center; }
}

@media (max-width: 980px) {
  .container { padding: 0 16px; }
  main article { margin: 0 5%; }
}

@media (max-width: 640px) {
  .site-nav {
    overflow: visible;
    padding-bottom: 8px;
    & li { display: inline-block; margin: .2em .5em; }
    & li a { font-size: 1em; letter-spacing: .08em; }
    & .social, & .social:hover { position: static; display: inline-block; vertical-align: middle; height: 20px; overflow: hidden; }
  }
  main article { margin: 0; }
  .gallery-grid { padding: 0; gap: 12px; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .photo-grid img { width: 100%; height: auto; aspect-ratio: 1 / 1; }
  .site-footer { grid-template-columns: 1fr; background-size: 50%; }
}
