/* rohal.ch — Stil (Design-Konzept: ../02_Layout/design-konzept.md) */

:root {
  --bg: #f6f1e7;
  --matte: #ece4d3;
  --ink: #2a241c;
  --ink-soft: #6b5f4f;
  --accent: #b85c26;
  --accent-dark: #94460f;
  --line: #d9cdb8;
  --card: #fffdf8;
  --font-display: Georgia, 'Times New Roman', serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Kopf */
header.site {
  padding: 56px 0 8px;
  text-align: center;
}
.site-title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5.5vw, 3.6rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  margin: 0 0 10px;
}
.site-sub {
  color: var(--ink-soft);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  margin: 0 auto;
  max-width: 46rem;
}

/* Slider */
.gallery { padding: 28px 0 8px; }

.slider { position: relative; touch-action: pan-y; }

/* Mobile: horizontales Wischen gehoert dem Slider, vertikales der Seite.
   Ohne touch-action kapert der Browser die Geste (pointercancel) und das
   Wischen kommt nie bei uns an (Befund 24.11.2026, CDP-Touch-Test). */

.slide {
  display: none;
  margin: 0;
}
.slide.is-active {
  display: flex;
  flex-direction: column;
}
.slide picture {
  display: flex;
  align-items: center;
  justify-content: center;
  height: min(72vh, 780px);
}
.slide img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  background: var(--matte);
  border-radius: 4px;
  box-shadow: 0 12px 34px rgba(42, 36, 28, 0.18);
}
@media (max-width: 700px) {
  .slide picture { height: 52vh; }
}

.slide figcaption {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.98rem;
  padding: 14px 10px 0;
  min-height: 1.6em;
}
.slide figcaption:empty { padding: 0; min-height: 0; }

.nav-btn {
  position: absolute;
  top: 36%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  z-index: 2;
}
.nav-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.nav-btn:focus-visible { outline: 3px solid var(--accent-dark); outline-offset: 2px; }
.nav-btn.prev { left: -8px; }
.nav-btn.next { right: -8px; }
@media (max-width: 700px) {
  .nav-btn { width: 46px; height: 46px; font-size: 1.5rem; top: 30%; }
  .nav-btn.prev { left: 4px; }
  .nav-btn.next { right: 4px; }
}

.dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 18px 0 4px;
  flex-wrap: wrap;
}
.dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-soft);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background 0.15s ease;
}
.dot[aria-current="true"] { background: var(--accent); border-color: var(--accent); }
.dot:focus-visible { outline: 3px solid var(--accent-dark); outline-offset: 2px; }

.counter {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 6px 0 0;
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .nav-btn, .dot { transition: none; }
}

/* Textabschnitte */
section.content { padding: 40px 0 8px; }
section.content .inner {
  max-width: 46rem;
  margin: 0 auto;
}
h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.7rem;
  margin: 0 0 12px;
}
section.content p { margin: 0 0 14px; }

/* Kontakt / Impressum */
.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 26px 28px;
  max-width: 46rem;
  margin: 0 auto;
}
.contact-card dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 22px;
  margin: 0;
}
.contact-card dt { color: var(--ink-soft); }
.contact-card dd { margin: 0; }
.contact-card a { color: var(--accent-dark); }

/* Fusszeile */
footer.site {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  padding: 26px 0 40px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
footer.site nav { margin-top: 6px; }
footer.site a { color: var(--ink-soft); text-decoration: underline; }
footer.site a:hover { color: var(--accent-dark); }
footer.site .sep { margin: 0 10px; }

/* Datenschutz-Seite */
main.page { padding: 48px 0 24px; }
main.page .inner { max-width: 46rem; margin: 0 auto; }
main.page h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2.1rem;
  margin: 0 0 18px;
}
main.page h2 { font-size: 1.25rem; margin: 28px 0 8px; }
main.page a { color: var(--accent-dark); }
.back-link { display: inline-block; margin-bottom: 26px; }

/* Lightbox (Klick aufs Bild zeigt die grosse Variante, 23.11.2026) */
.slide picture { cursor: zoom-in; }
.slide picture:focus-visible { outline: 3px solid var(--accent-dark); outline-offset: 4px; }

/* iOS: langes Druecken auf Bilder soll kein Callout-Sheet oeffnen (frisst die Geste) */
.slide picture, .lb-figure picture {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.hint {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin: 8px 0 0;
}

body.lb-open { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(42, 36, 28, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Mobile: alle Gesten in der Lightbox gehoeren uns (Wischen, Tippen);
   kein Pan/Rubber-Band/History-Swipe des Browsers (pointercancel-Falle). */
  touch-action: none;
  overscroll-behavior: contain;
}
.lightbox[hidden] { display: none; }

.lb-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lb-figure picture { display: flex; justify-content: center; }
.lb-figure img {
  display: block;
  max-width: 92vw;
  max-height: 78vh;
  width: auto;
  height: auto;
  border-radius: 4px;
  background: var(--matte);
}
.lb-caption {
  color: #f6f1e7;
  font-size: 1rem;
  text-align: center;
  padding-top: 12px;
  min-height: 1.4em;
}
.lb-caption:empty { display: none; }
.lb-counter {
  color: rgba(246, 241, 231, 0.7);
  font-size: 0.9rem;
  margin: 4px 0 0;
  font-variant-numeric: tabular-nums;
}

.lb-btn, .lb-close {
  position: fixed;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(246, 241, 231, 0.35);
  border-radius: 50%;
  background: rgba(246, 241, 231, 0.08);
  color: #f6f1e7;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
  z-index: 51;
}
.lb-btn:hover, .lb-close:hover { background: var(--accent); border-color: var(--accent); }
.lb-btn:focus-visible, .lb-close:focus-visible { outline: 3px solid #f6f1e7; outline-offset: 2px; }
.lb-close { top: 18px; right: 20px; }
.lb-btn.prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-btn.next { right: 18px; top: 50%; transform: translateY(-50%); }

@media (max-width: 700px) {
  .lb-btn, .lb-close { width: 46px; height: 46px; font-size: 1.5rem; }
  .lb-btn.prev { left: 8px; }
  .lb-btn.next { right: 8px; }
  .lb-figure img { max-height: 72vh; }
}
@media (prefers-reduced-motion: reduce) {
  .lb-btn, .lb-close { transition: none; }
}
