/* Final cookie consent presentation.
   Loaded after the compiled stylesheet so the FTP package can be adjusted
   without changing the generated application bundle. */

body:has(.cookie-panel--settings) {
  overflow: hidden;
}

.cookie-panel,
.cookie-panel--settings {
  color: #f4f5f6;
  background: #080b0f;
  border-color: #303740;
  box-shadow: 0 -16px 44px rgba(0, 0, 0, 0.64);
}

.cookie-panel__copy > p {
  color: #b8c0c9;
}

.cookie-panel__copy a {
  color: #f4f5f6;
  text-decoration-color: #7d8792;
}

.cookie-button {
  color: #f4f5f6;
  background: #11161c;
  border-color: #48515b;
  border-radius: 2px;
}

.cookie-button:hover {
  color: #ffffff;
  background: #192029;
  border-color: #8e99a5;
}

.cookie-button--accept,
.cookie-button--accept:hover {
  color: #080b0f;
  background: #f4f5f6;
  border-color: #f4f5f6;
}

.cookie-button--accept:hover {
  background: #dfe3e6;
}

/* The detailed choices are a true modal instead of a second bottom bar. */
.cookie-layer:has(.cookie-panel--settings) {
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: auto;
  background: rgba(1, 3, 5, 0.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.cookie-panel--settings {
  width: min(100%, 780px);
  min-height: 0;
  max-height: calc(100dvh - 48px);
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 26px;
  padding: 34px;
  border: 1px solid #39414a;
  border-radius: 4px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.72);
  animation: cookie-modal-in 0.22s ease both;
}

.cookie-panel--settings .cookie-panel__copy {
  padding-right: 54px;
}

.cookie-panel--settings .cookie-panel__copy h2 {
  font-size: 1.35rem;
}

.cookie-panel--settings .cookie-preferences {
  gap: 8px;
}

.cookie-panel--settings .cookie-option {
  min-height: 82px;
  padding: 17px 19px;
  background: #0e1318;
  border-color: #2e3740;
}

.cookie-panel--settings .cookie-option strong {
  font-family: Inter, Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 750;
  text-transform: none;
}

.cookie-panel--settings .cookie-option small {
  color: #9da7b1;
}

.cookie-panel--settings .cookie-option i,
.cookie-panel--settings .cookie-option input:checked + i {
  background: #1b222a;
  border-color: #59636e;
}

.cookie-panel--settings .cookie-option input:checked + i {
  background: #f4f5f6;
  border-color: #f4f5f6;
}

.cookie-panel--settings .cookie-option input:checked + i::after {
  background: #080b0f;
}

.cookie-panel--settings .cookie-actions--settings {
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}

.cookie-panel--settings .cookie-panel__close {
  top: 28px;
  right: 28px;
  background: transparent;
  border-color: #48515b;
}

@keyframes cookie-modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 820px) {
  .cookie-layer:has(.cookie-panel--settings) {
    align-items: center;
    padding: 16px;
  }

  .cookie-panel--settings {
    width: min(100%, 620px);
    max-height: calc(100dvh - 32px);
    gap: 20px;
    padding: 24px 20px 20px;
    border-radius: 4px;
  }

  .cookie-panel--settings .cookie-panel__copy {
    padding-right: 42px;
  }

  .cookie-panel--settings .cookie-panel__close {
    top: 18px;
    right: 18px;
  }

  .cookie-panel--settings .cookie-actions--settings {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .cookie-layer:has(.cookie-panel--settings) {
    padding: 10px;
  }

  .cookie-panel--settings {
    max-height: calc(100dvh - 20px);
    padding: 22px 16px 16px;
  }

  .cookie-panel--settings .cookie-option {
    min-height: 76px;
    gap: 14px;
    padding: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-panel--settings {
    animation: none;
  }
}

/* Legal pages use a compact heading instead of the general page hero. */
main:has(> .legal) > .page-hero--bare {
  min-height: 0;
  display: block;
  padding-top: 104px;
  border-bottom: 0;
}

main:has(> .legal) > .page-hero--bare .page-hero__copy {
  width: min(calc(100% - 96px), 980px);
  min-height: 0;
  margin-inline: auto;
  padding: 64px 0 22px;
  background: transparent;
}

main:has(> .legal) > .page-hero--bare .page-hero__copy::after {
  display: none;
}

main:has(> .legal) > .page-hero--bare h1 {
  max-width: none;
  margin: 0;
  color: #f7f4ed;
  font-size: clamp(2.8rem, 4.5vw, 4.8rem);
  font-style: normal;
  line-height: 1.05;
  letter-spacing: -0.045em;
  text-transform: none;
}

main:has(> .legal) > .legal {
  padding-top: 34px;
}

@media (max-width: 820px) {
  main:has(> .legal) > .page-hero--bare {
    padding-top: 76px;
    background: #f3f1eb;
  }

  main:has(> .legal) > .page-hero--bare .page-hero__copy {
    width: 100%;
    padding: 42px 20px 16px;
  }

  main:has(> .legal) > .page-hero--bare h1 {
    color: #0a1219;
    font-size: clamp(2.5rem, 12vw, 3.4rem);
  }

  main:has(> .legal) > .legal {
    padding-top: 28px;
  }
}

/* Clearer, calmer project filters with an unmistakable active state. */
.filter-bar {
  gap: 8px;
  padding-bottom: 26px;
}

.filter-bar button {
  min-height: 46px;
  padding: 11px 17px;
  color: #cbd3db;
  background: #0d1218;
  border: 1px solid #343d47;
  border-radius: 2px;
  font-size: 0.84rem;
  font-weight: 700;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.filter-bar button:hover {
  color: #ffffff;
  background: #151c24;
  border-color: #75808b;
  transform: translateY(-1px);
}

.filter-bar button.is-active,
.filter-bar button.is-active:hover {
  color: #070b0f;
  background: #f3f4f2;
  border-color: #f3f4f2;
  box-shadow: inset 0 -3px 0 #00cfd4;
}

@media (max-width: 560px) {
  .filter-bar {
    gap: 7px;
    padding-bottom: 22px;
  }

  .filter-bar button {
    min-height: 44px;
    padding-inline: 15px;
    font-size: 0.8rem;
  }
}

/* Blog detail: centered reading column with the back button after the article. */
.blog-article.section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.blog-article__content {
  order: 1;
  width: 100%;
  max-width: 820px;
}

.blog-article__content > div {
  text-align: center;
}

.blog-article__content h1::after,
.blog-article__content h2::after,
.blog-article__content h3::after,
.blog-article__content h4::after,
.blog-article__content h5::after {
  margin-inline: auto;
}

.blog-article__content ul,
.blog-article__content ol {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  text-align: left;
}

.blog-article__back {
  order: 2;
  position: static;
  align-self: center;
  margin-top: 38px;
}

.blog-article__back .action-link {
  min-width: 190px;
}

@media (max-width: 560px) {
  .blog-article__back {
    width: 100%;
    margin-top: 28px;
  }

  .blog-article__back .action-link {
    width: 100%;
  }
}

/* Discreet attribution for the specifically licensed Thomas Steinlechner images. */
.has-image-credit {
  position: relative;
}

.image-credit {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 5;
  padding: 5px 8px;
  color: #ffffff;
  background: rgba(4, 8, 12, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.64rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.015em;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

.page-hero__image.has-image-credit .image-credit {
  right: 14px;
  bottom: 14px;
}

/* Keep the lower-right image number clear, including on narrow gallery cards. */
.detail-gallery .image-credit {
  left: 16px;
  right: auto;
  bottom: 15px;
  max-width: calc(100% - 88px);
  box-sizing: border-box;
}

@media (max-width: 560px) {
  .image-credit,
  .page-hero__image.has-image-credit .image-credit {
    right: 7px;
    bottom: 7px;
    padding: 4px 6px;
    font-size: 0.57rem;
  }

  .detail-gallery .image-credit {
    left: 7px;
    right: auto;
    max-width: calc(100% - 79px);
  }
}
