:root {
  --hx-ink: #1a1a1a;
  --hx-muted: #6b6b6b;
  --hx-paper: #f7f5f1;
  --hx-wash: #efeae2;
  --hx-line: rgba(26, 26, 26, 0.12);
  --hx-nav: rgba(239, 234, 226, 0.72);
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Manrope", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background-color: var(--hx-paper);
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--hx-ink);
  font-family: var(--font-body);
  /* Solid base so long gallery pages never flash white while scrolling */
  background-color: var(--hx-paper);
  background-image:
    radial-gradient(1200px 600px at 10% -10%, #fff 0%, transparent 55%),
    linear-gradient(180deg, var(--hx-paper), #f3efe8 45%, #ebe4da);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

#scroll_container,
#main_content {
  min-height: 100vh;
}

header.container-fluid {
  position: relative;
  z-index: 30;
}

.navbar-brand img {
  height: 28px;
  width: auto;
}

.hx-nav-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  min-width: min(100vw, 22rem);
  width: min(100vw, 22rem);
  padding: 5rem 2rem 2rem;
  background: var(--hx-nav);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  backdrop-filter: blur(12px) saturate(1.05);
  -webkit-backdrop-filter: blur(12px) saturate(1.05);
  transition: opacity .35s ease, visibility .35s ease;
  color: var(--hx-ink);
}

body.nav-open .hx-nav-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.nav-open header {
  z-index: 70;
}

.navbar-toggler {
  z-index: 80;
  position: relative;
}

.navbar-nav .nav-link {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: .35rem 0;
  color: var(--hx-ink) !important;
  text-shadow: 0 0 12px rgba(247, 245, 241, 0.55);
}

.home-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  width: 100%;
}

body.home {
  height: 100vh;
  overflow: hidden;
}

body.home #scroll_container,
body.home #main_content {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body.home #main_content > header {
  flex: 0 0 auto;
}

.home-logo-col {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.home-logo {
  width: min(28vw, 320px);
  height: auto;
  opacity: 0.95;
  animation: fadeRise .9s ease both;
}

.home-hero-col {
  flex: 0 1 auto;
  display: flex;
  align-items: center;          /* vertikal mittig */
  justify-content: flex-end;    /* am rechten Rand */
  height: 100%;
  min-height: 0;
  padding: 0;
}

.home-hero-link {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  max-height: 100%;
}

.home-hero {
  display: block;
  height: auto;
  width: auto;
  max-height: 100%;
  max-width: min(92vw, 720px);
  object-fit: contain;
  object-position: right center;
  animation: fadeRise 1.1s ease .1s both;
  filter: saturate(1.02);
}

@media (max-width: 1199.98px) {
  .home-stage {
    justify-content: center;
  }

  .home-hero-col {
    width: 100%;
    justify-content: center;
    padding: 0 1rem;
  }

  .home-hero-link {
    justify-content: center;
  }

  .home-hero {
    max-width: 100%;
    object-position: center center;
  }
}

.gallery {
  padding-bottom: 4rem;
}

.petersburg img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity .25s ease, filter .25s ease;
}

.petersburg img.hover {
  opacity: 1;
  filter: none;
}

.petersburg img.no-hover {
  opacity: 0.35;
  filter: grayscale(0.15);
}

.arrow-up {
  display: block;
  width: 2rem;
  height: 2rem;
  margin: 2rem auto 0;
  border: none;
  background: transparent;
  position: relative;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s ease, visibility .25s ease;
}

.arrow-up.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.arrow-up::before {
  content: "";
  position: absolute;
  inset: 0;
  border-left: 1px solid var(--hx-ink);
  border-top: 1px solid var(--hx-ink);
  transform: rotate(45deg) translate(4px, 4px);
}

.page-title,
.section-label {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.contact {
  padding-bottom: 5rem;
  max-width: 48rem;
}

.contact p,
.contact-block {
  line-height: 1.7;
  color: #2b2b2b;
}

.gallery-modal-content {
  background: rgba(12, 12, 12, 0.92);
  color: #fff;
  border: 0;
  border-radius: 0;
}

.gallery-modal-body {
  min-height: 0;
}

.gallery-modal-media {
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.gallery-modal-media img {
  max-height: calc(100vh - 8rem);
  width: auto;
  max-width: 100%;
  pointer-events: none;
}

.gallery-nav {
  background: none;
  border: 0;
  color: #fff;
  font-size: 3rem;
  line-height: 1;
  padding: 0 0.5rem;
  opacity: 0.85;
  flex-shrink: 0;
  min-width: 2.75rem;
  min-height: 2.75rem;
}

.gallery-nav:hover,
.gallery-nav:focus-visible {
  opacity: 1;
}

.gallery-modal-counter {
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  opacity: 0.85;
}

.gallery-modal-caption {
  color: #ddd;
  font-size: 0.95rem;
}

.gallery-swipe-hint {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  transition: opacity .35s ease;
}

.gallery-swipe-hint.is-hidden {
  opacity: 0;
}

@media (max-width: 767.98px) {
  .gallery-modal-media img {
    max-height: calc(100vh - 10rem);
  }

  .gallery-nav {
    font-size: 2.4rem;
    opacity: 0.95;
  }

  .modal-header .btn-close {
    margin-right: 0.25rem;
  }
}

.message,
.flash-message,
.message.success,
.message.error {
  margin: 0.75rem 1rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid var(--hx-line);
}

@keyframes fadeRise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
