:root {
  --header-height: 58px;
  scroll-padding-top: var(--header-height);
  color-scheme: dark;
  font-family: Georgia, "Times New Roman", serif;
  background: #100d0d;
  color: #f2e7db;
}

* { box-sizing: border-box; }

body { margin: 0; isolation: isolate; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: #100d0d url("assets/herbsttal.jpg") center 48% / cover no-repeat;
}

.site-stage {
  min-height: 100svh;
  padding-top: var(--header-height);
  background:
    linear-gradient(180deg, #140e0b60 0%, #140e0b19 37%, #140e0b30 64%, #100d0d 100%),
    radial-gradient(ellipse at 50% 45%, transparent 43%, #140e0b65 100%);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-header {
  position: fixed;
  z-index: 2;
  inset: 0 0 auto;
  min-height: var(--header-height);
  display: grid;
  place-items: center;
  padding: 8px 16px;
  background: #100d0dd9;
  border-bottom: 1px solid #80605250;
}

.wordmark {
  padding: 6px 8px;
  color: #f2e7db;
  font-size: 1.18rem;
  letter-spacing: .16em;
  text-decoration: none;
  text-transform: uppercase;
}

.wordmark span { color: #c3a18a; }

main {
  display: grid;
  justify-items: center;
  padding: clamp(12px, 2.4vw, 26px) 10px 24px;
}

.portrait {
  position: relative;
  isolation: isolate;
  overflow: clip;
  width: min(100%, clamp(440px, calc((100svh - 110px) * 2 / 3), 655px));
  aspect-ratio: 2 / 3;
  background: #22130f;
  box-shadow: 0 0 0 1px #8c675957, 0 20px 85px #000b;
}

.portrait-backdrop {
  display: block;
  width: 100%;
  height: 100%;
}

.artifact {
  position: absolute;
  inset: 0;
  color: #f9eee2;
  pointer-events: none;
}

.artifact-image, .artifact-label {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.artifact-image {
  --pivot-x: 50%;
  --pivot-y: 50%;
  left: var(--x);
  top: var(--y);
  display: block;
  transform-origin: var(--pivot-x) var(--pivot-y);
  translate: calc(-1 * var(--pivot-x)) calc(-1 * var(--pivot-y));
  rotate: var(--angle, 0deg);
  scale: var(--scale, 1);
  transition: scale 200ms ease, filter 200ms ease;
  filter: brightness(var(--brightness, 1)) drop-shadow(0 5px 5px #090402aa);
  user-select: none;
}

.crown { --x: 59.8%; --y: 31%; --angle: 8deg; }
.crown-image {
  --pivot-x: 75.2%;
  --pivot-y: 57.7%;
  --rim-join: 79%;
  width: 39.5%;
}
.crown-image img { display: block; width: 100%; height: auto; }
.crown-image img:first-child { clip-path: inset(0 calc(100% - var(--rim-join)) 0 0); }
.crown-rim-far {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 calc(var(--rim-join) - .3%));
  transform-origin: var(--rim-join) center;
  transform: scaleX(1.37);
}
.crown .artifact-label { left: 53%; top: 15%; }

.rose { --x: 37.8%; --y: 59.35%; --angle: -22deg; }
.rose .artifact-image {
  --pivot-x: 45%;
  --pivot-y: 76%;
  width: auto;
  height: 31%;
}
.rose .artifact-label { left: 26%; top: 36.5%; }

.sword { --x: 62.5%; --y: 79.8%; --angle: 18deg; }
.sword .artifact-image {
  --pivot-y: 84%;
  width: auto;
  height: 80%;
  clip-path: polygon(29% 0, 71% 0, 71% 68%, 92% 68%, 92% 76%, 75% 76%, 75% 100%, 25% 100%, 25% 76%, 8% 76%, 8% 68%, 29% 68%);
}
.sword .artifact-label { left: 85%; top: 65%; }

/* Bring the fingers in front of the separate, animated stem and grip. */
.rose::after, .sword::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: url("assets/ritterportraet-griffe.jpg") center / 100% 100% no-repeat;
}

.rose::after {
  clip-path: polygon(
    30.57% 56.97%, 33.2% 57.16%, 35.35% 57.62%, 37.01% 58.27%, 37.79% 58.72%, 37.79% 59.11%,
    37.11% 59.38%, 36.55% 59.33%, 35.1% 58.95%, 32.8% 58.55%, 30.6% 58.4%, 27.8% 60.4%,
    24.9% 61.15%, 24.6% 60.5%, 27.5% 58.3%
  );
}

.sword::after {
  clip-path: polygon(
    70.5% 74.4%, 75.68% 80.47%, 73.44% 84.51%, 69.04% 86.2%, 63.67% 86.07%, 59.67% 84.57%, 57.32% 82.68%,
    58.59% 82.23%, 57.13% 80.86%, 58.59% 79.82%, 57.71% 78.06%, 59.28% 76.89%, 58.5% 76.3%,
    59.47% 74.87%, 60.94% 74.48%, 63.28% 74.02%, 65.63% 74.15%, 67.77% 74.54%, 68.75% 74.93%
  );
}

.artifact-label {
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: .45em;
  min-height: 32px;
  padding: 4px .7em;
  transform: translate(-50%, -50%);
  background: #160e0dea;
  border: 1px solid #a87c66ab;
  font-size: clamp(.74rem, 2.8vw, .92rem);
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.artifact-label span { color: #e4a990; }

@media (hover: hover) {
  .artifact:hover { --scale: 1.065; --brightness: 1.22; }
  .artifact:hover .artifact-label { border-color: #e0b295; }
}

.artifact:focus-visible { --scale: 1.065; --brightness: 1.22; outline: none; }
.artifact:focus-visible .artifact-label, .wordmark:focus-visible { outline: 2px solid #f8c5a5; outline-offset: 3px; }
.artifact:active { --scale: 1.105; --brightness: 1.3; }
.artifact:active .artifact-image { transition-duration: 85ms; }

@media (pointer: coarse) {
  .artifact-label { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .artifact-image { transition: none; }
}

.site-footer {
  max-width: 1280px;
  margin-inline: auto;
  padding: clamp(16px, 3vw, 44px) clamp(16px, 4vw, 56px) 8px;
  font-family: system-ui, sans-serif;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 3vw, 42px);
}

.footer-links h2 {
  margin: 0 0 .45rem;
  padding-bottom: .45rem;
  border-bottom: 1px solid #d29d6f70;
  color: #f4dbc4;
  font-size: clamp(.85rem, 2.8vw, 1rem);
}

.footer-links ul { margin: 0; padding: 0; list-style: none; }
.footer-links a { color: #e8cdb8; font-size: .88rem; text-decoration: none; }
.footer-links a { display: inline-flex; align-items: center; min-height: 28px; }
.footer-links a:hover { color: #ffe2aa; text-decoration: underline; }
.footer-links a:focus-visible { outline: 2px solid #f8c5a5; outline-offset: 3px; }

.legal-page {
  min-height: 100svh;
  padding: calc(var(--header-height) + clamp(24px, 6vw, 72px)) 16px clamp(36px, 7vw, 88px);
  background: #100d0d80;
}

.legal-copy {
  width: min(100%, 740px);
  padding: clamp(22px, 5vw, 52px);
  border: 1px solid #806052;
  border-radius: 6px;
  background: #191210f5;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.legal-copy h1 { margin: 0 0 .65em; color: #ffe2c6; font-size: clamp(2.1rem, 6vw, 3.8rem); line-height: 1.1; }
.legal-copy h2 { margin: 1.35em 0 .45em; color: #f0c7a6; font-size: 1.3rem; line-height: 1.3; }
.legal-copy address { font-style: normal; }
.legal-copy p { margin: 0 0 .9em; }
.legal-copy a { color: #f8c5a5; text-underline-offset: .2em; }
.legal-copy a:hover { color: #fff3e6; }
.legal-copy a:focus-visible { outline: 2px solid #f8c5a5; outline-offset: 3px; }
.legal-navigation { display: flex; flex-wrap: wrap; gap: .55rem 1.25rem; margin-top: 1.5rem; border-top: 1px solid #806052; padding-top: 1rem; }

.page-end {
  overflow: clip;
  pointer-events: none;
  background: #100d0d;
}

.closing-wordmark {
  width: min(calc(100% - 32px), 1280px);
  margin: 0 auto;
  padding-block: 0 clamp(16px, 2.5vw, 32px);
  font-family: system-ui, sans-serif;
  color: #c99568;
  background: linear-gradient(180deg, #a36a5400 10%, #a36a5433 32%, #bf876a 66%, #efbd93 94%);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: min(13.4vw, 11rem);
  font-weight: 850;
  line-height: .87;
  letter-spacing: -.075em;
  text-align: center;
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .closing-wordmark {
      animation: reveal-wordmark linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 90%;
    }
  }
}

@keyframes reveal-wordmark {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 520px) {
  .footer-links { gap: 10px; }
  .footer-links a { min-height: 34px; }
}
