/* kunstundkreation.ch – theme (2026 rewrite of the 2011 "paintings" theme) */

:root {
  --text: #3f3f3f;
  --accent: #9f0016;
  --paper: rgb(252 252 252 / 0.92);
  --shadow: 4px 4px 4px rgb(0 0 0 / 0.5);
  --radius: 10px;
  --card-width: 560px;
  --header-height: 3.4rem;
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  font: 15px/1.5 system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
  background: #fff;
}

/* Background painting, fixed behind everything */
.bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

/* Header / menu */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  justify-content: center;
}
.site-header nav {
  background: #fcfcfc;
  box-shadow: var(--shadow);
  border-bottom-right-radius: var(--radius);
}
.site-header ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-header li + li { border-left: 1px solid #eee; }
.site-header a {
  display: block;
  padding: 0.8em 1.2em;
  font-size: 1.15em;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.site-header a:hover,
.site-header a:focus-visible,
.site-header a[aria-current="page"] { color: #000; }
.site-header a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.3em; }

/* Content card + footer */
.card {
  width: min(var(--card-width), 100% - 1.5rem);
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  background: var(--paper);
  box-shadow: var(--shadow);
}
main.card {
  margin-top: calc(var(--header-height) + 5rem);
  border-top-left-radius: var(--radius);
}
footer.card {
  margin-top: 1rem;
  margin-bottom: 3rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.8em;
  border-top: 1px solid #666;
  border-bottom-right-radius: var(--radius);
}

/* Typography */
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: 2.3em; text-align: center; margin-bottom: 0.8em; text-shadow: 2px 2px 2px rgb(0 0 0 / 0.3); }
h2 { font-size: 1.6em; margin-top: 1.4em; }
h3 { font-size: 1.2em; margin-top: 1.2em; }
p { margin: 0 0 1em; }
blockquote {
  margin: 0 0 1.2em;
  padding: 0.2em 0.5em;
  font: italic 1.35em/1.3 Georgia, "Times New Roman", serif;
  color: #888;
}
a { color: var(--accent); }
a:hover { text-decoration: none; }
main img { max-width: 100%; height: auto; box-shadow: 3px 3px 7px rgb(119 119 119 / 0.5); }

.portrait {
  float: left;
  margin: 0.3em 1em 0.5em 0;
  width: 160px;
}

table { border-collapse: collapse; margin-bottom: 2em; }
td, th { padding: 0.25em 0.8em 0.25em 0; vertical-align: top; text-align: left; }
th { font-weight: 700; white-space: nowrap; }

.video {
  aspect-ratio: 16 / 9;
  margin: 1.5em 0;
  clear: both;
}
.video iframe { width: 100%; height: 100%; border: 0; box-shadow: 3px 3px 7px rgb(119 119 119 / 0.5); }

address { font-style: normal; }

/* Slider */
.slider {
  position: relative;
  aspect-ratio: 520 / 274;
  margin: 0 0 1.5em;
  overflow: hidden;
  box-shadow: 3px 3px 7px rgb(119 119 119 / 0.5);
}
.slider figure {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.slider figure.is-active { opacity: 1; }
.slider img { display: block; width: 100%; height: 100%; object-fit: cover; box-shadow: none; }
.slider figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.6em 1em;
  background: rgb(0 0 0 / 0.6);
  color: #fff;
}
.slider figcaption a { color: #fff; }
.slider button {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: 2.2em;
  height: 2.2em;
  border: 0;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.4);
  color: #fff;
  font-size: 1.2em;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s;
}
.slider:hover button,
.slider:focus-within button { opacity: 1; }
.slider .prev { left: 0.5em; }
.slider .next { right: 0.5em; }
.slider .dots {
  position: absolute;
  top: 0.6em;
  right: 0.8em;
  display: flex;
  gap: 0.4em;
}
.slider .dots button {
  position: static;
  translate: none;
  width: 0.7em;
  height: 0.7em;
  opacity: 0.6;
  background: #fff;
  padding: 0;
}
.slider .dots button[aria-current="true"] { opacity: 1; background: var(--accent); }

/* Gallery grid + lightbox */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.9rem;
  margin: 0 0 1.5em;
  padding: 0;
  list-style: none;
}
.gallery a { display: block; color: inherit; text-decoration: none; }
.gallery img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform 0.2s; }
.gallery a:hover img, .gallery a:focus-visible img { transform: scale(1.03); }
.gallery figure { margin: 0; }
.gallery figcaption { margin-top: 0.4em; font-size: 0.85em; line-height: 1.3; }

.lightbox {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: 100vw;
  max-height: 100vh;
}
.lightbox::backdrop { background: rgb(0 0 0 / 0.85); }
.lightbox img {
  display: block;
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 2rem);
  margin: 1rem auto;
  box-shadow: 0 0 30px rgb(0 0 0 / 0.6);
}
.lightbox button {
  position: fixed;
  top: 50%;
  translate: 0 -50%;
  width: 2.6em;
  height: 2.6em;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.2);
  color: #fff;
  font-size: 1.3em;
  cursor: pointer;
}
.lightbox .prev { left: 0.6em; }
.lightbox .next { right: 0.6em; }
.lightbox .close { top: 1em; right: 0.6em; translate: none; }
.lightbox .counter {
  position: fixed;
  bottom: 0.6em;
  left: 50%;
  translate: -50% 0;
  color: #fff;
  font-size: 0.85em;
}

/* Signature, bottom right */
.sig {
  position: fixed;
  right: 0;
  bottom: 0;
  z-index: 20;
  width: 150px;
}
.sig img { display: block; width: 100%; }

@media (max-width: 700px) {
  .sig { width: 90px; }
  body { font-size: 14px; }
  .site-header a { padding: 0.7em 0.8em; font-size: 1em; }
  .portrait { width: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  .slider figure, .gallery img, .slider button { transition: none; }
}
