/* ==========================================================
   HOF REUTENEN · Sektion „Räume“
   Alle Klassen mit Präfix .hr-raeume – kollidiert nicht mit styles.css
   Schriften & Farben = Website (Big Caslon / Aptifer Sans LT Pro, #533421)
   ========================================================== */

/* Die Website legt .page-shell { overflow: hidden } um alles – das verhindert
   „position: sticky“. overflow-x: clip schneidet genauso ab, ist aber kein
   Scroll-Container, dadurch bleibt der Grundriss beim Scrollen stehen. */
.page-shell {
  overflow: visible;
  overflow-x: clip;
}

@property --hr-s {
  syntax: '<number>';
  inherits: true;
  initial-value: 1;
}

.hr-raeume {
  --hr-brown: #533421;
  --hr-bg: #f7f4ef;
  --hr-paper: #fbf9f5;
  --hr-sand: #d9c7a9;
  --hr-line: rgba(83, 52, 33, 0.12);
  --hr-soft: rgba(83, 52, 33, 0.78);
  --hr-serif: 'Big Caslon', 'Libre Caslon Text', Georgia, serif;
  --hr-sans: 'Aptifer Sans LT Pro', 'Source Sans 3', sans-serif;
  --hr-ease: cubic-bezier(0.22, 0.7, 0.18, 1);

  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 7rem 0 6rem;
  background: var(--hr-bg);
  color: var(--hr-brown);
  font-family: var(--hr-serif);
}

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

.hr-raeume__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

/* ---------- Kopf ---------- */
.hr-raeume__head {
  max-width: 46rem;
  margin: 0 auto 2rem;
  text-align: center;
}

.hr-raeume__ornament {
  display: block;
  width: 2.4rem;
  height: auto;
  margin: 0 auto 1.8rem;
}

.hr-raeume__eyebrow {
  margin: 0 0 1rem;
  font-family: var(--hr-sans);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.hr-raeume__title {
  margin: 0 auto 1.4rem;
  max-width: 13.5em;
  text-wrap: balance;
  font-family: var(--hr-serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 4vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: 0.06em;
}

.hr-raeume__lead {
  margin: 0 auto;
  max-width: 44rem;
  text-wrap: balance;
  font-size: 1.18rem;
  line-height: 1.6;
}

/* ---------- Bühne: Grundriss sticky + Kapitel ---------- */
.hr-raeume__stage {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 0 4.5rem;
  align-items: start;
}

.hr-raeume__visual {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  perspective: 1000px;
  z-index: 1;
}

.hr-raeume__card {
  width: 100%;
  margin: 0;
  padding: 1.4rem 1.4rem 1.2rem;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 0.45rem;
  box-shadow: 0 20px 45px rgba(17, 17, 17, 0.08), 0 60px 80px rgba(83, 52, 33, 0.06);
  transform-origin: 50% 0%;
  will-change: transform;
}

.hr-raeume__cardhead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin: 0 0 1rem;
  font-family: var(--hr-sans);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hr-raeume__counter {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  white-space: nowrap;
}

.hr-raeume__counter-no {
  font-family: var(--hr-serif);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.hr-raeume__counter-sep { opacity: 0.55; }

.hr-raeume__counter-name {
  min-width: 9.5rem;
  text-align: right;
}

.hr-raeume__viewport {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2955 / 1715;
  background: var(--hr-paper);
  border-radius: 0.25rem;
}

.hr-raeume__zoom {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  transition: transform 1.1s var(--hr-ease), --hr-s 1.1s var(--hr-ease);
}

.hr-raeume__plan {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
}

.hr-raeume__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.hr-raeume__dim {
  fill: var(--hr-paper);
  opacity: 0;
  transition: opacity 0.7s var(--hr-ease);
}

.hr-raeume__shape {
  fill: rgba(217, 199, 169, 0.22);
  stroke: var(--hr-brown);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  transition: opacity 0.7s var(--hr-ease);
}

.hr-raeume__dim.is-active { opacity: 0.66; }
.hr-raeume__shape.is-active { opacity: 1; }

/* Nummern im Plan */
.hr-raeume__pins {
  position: absolute;
  inset: 0;
}

.hr-raeume__pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 2.1rem;
  height: 2.1rem;
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--hr-brown);
  border-radius: 50%;
  background: var(--hr-paper);
  color: var(--hr-brown);
  font-family: var(--hr-serif);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transform: translate(-50%, -50%) scale(calc(1 / var(--hr-s)));
  transition: background 0.4s ease, color 0.4s ease, opacity 0.5s ease, box-shadow 0.4s ease;
  box-shadow: 0 6px 14px rgba(83, 52, 33, 0.12);
}

.hr-raeume__pin:hover,
.hr-raeume__pin:focus-visible {
  background: var(--hr-brown);
  color: #fff;
  outline: none;
}

.hr-raeume__pin:focus-visible { box-shadow: 0 0 0 3px var(--hr-paper), 0 0 0 5px var(--hr-brown); }

.hr-raeume[data-active]:not([data-active='']) .hr-raeume__pin { opacity: 0.35; }

.hr-raeume[data-active]:not([data-active='']) .hr-raeume__pin.is-active {
  opacity: 1;
  background: var(--hr-brown);
  color: #fff;
}

/* Fortschritt */
.hr-raeume__progress {
  position: relative;
  height: 1px;
  margin-top: 1.1rem;
  background: var(--hr-line);
  overflow: hidden;
}

.hr-raeume__progress span {
  position: absolute;
  inset: 0;
  background: var(--hr-brown);
  transform-origin: 0 50%;
  transform: scaleX(0);
  transition: transform 0.6s var(--hr-ease);
}

/* ---------- Kapitel ---------- */
.hr-raeume__step {
  /* je Variante zusätzlich 75vh Scrollweg */
  min-height: calc(100vh + (var(--n, 1) - 1) * 75vh);
  padding: var(--hr-top, 18vh) 0 2rem;
  opacity: 0.22;
  transition: opacity 0.6s var(--hr-ease);
}

.hr-raeume__stepin {
  position: sticky;
  top: var(--hr-top, 18vh);
}

.hr-raeume__step.is-active { opacity: 1; }

.hr-raeume__kicker {
  margin: 0 0 1.1rem;
  font-family: var(--hr-sans);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.hr-raeume__name {
  margin: 0 0 1.3rem;
  font-family: var(--hr-serif);
  font-weight: 400;
  font-size: clamp(2rem, 2.8vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0.03em;
}

.hr-raeume__claim {
  margin: 0 0 1.4rem;
  font-size: 1.4rem;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hr-raeume__text {
  margin: 0 0 2rem;
  max-width: 30rem;
  font-size: 1.12rem;
  line-height: 1.7;
}

.hr-raeume__facts {
  margin: 0;
  max-width: 30rem;
  border-top: 1px solid var(--hr-line);
}

.hr-raeume__facts > div {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--hr-line);
}

.hr-raeume__facts dt {
  font-family: var(--hr-sans);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding-top: 0.3rem;
}

.hr-raeume__facts dd {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.45;
}

/* Index im Intro-Kapitel */
.hr-raeume__index {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 30rem;
  border-top: 1px solid var(--hr-line);
}

.hr-raeume__index a {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--hr-line);
  color: inherit;
  text-decoration: none;
  font-size: 1.12rem;
  transition: padding 0.3s ease;
}

.hr-raeume__index a span {
  font-family: var(--hr-sans);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  opacity: 0.6;
}

.hr-raeume__index a:hover,
.hr-raeume__index a:focus-visible { padding-left: 0.5rem; outline: none; }

/* ---------- Bestuhlungsvarianten ---------- */
.hr-raeume__var {
  position: absolute;
  max-width: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s var(--hr-ease);
}

.hr-raeume__var.is-on { opacity: 1; }

.hr-raeume__vars {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.8rem;
}

.hr-raeume__vbtn {
  position: relative;
  min-height: 2.5rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid rgba(83, 52, 33, 0.35);
  border-radius: 999px;
  background: transparent;
  color: var(--hr-brown);
  font-family: var(--hr-sans);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

.hr-raeume__vbtn:hover { border-color: var(--hr-brown); }

.hr-raeume__vbtn[aria-pressed='true'] {
  background: var(--hr-brown);
  border-color: var(--hr-brown);
  color: #fff;
}

.hr-raeume__vbtn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--hr-bg), 0 0 0 5px var(--hr-brown);
}

.hr-raeume__facts > div[hidden] { display: none; }

.hr-raeume__facts > div[data-var] { animation: hr-fact-in 0.5s var(--hr-ease); }

@keyframes hr-fact-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Formate ---------- */
.hr-raeume__formats {
  margin-top: 4rem;
  text-align: center;
}

.hr-raeume__formats-head { margin-bottom: 2.5rem; }

.hr-raeume__formats-title {
  margin: 0;
  font-family: var(--hr-serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 2.8vw, 2.8rem);
  letter-spacing: 0.04em;
}

.hr-raeume__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
  max-width: 1120px;
  margin: 0 auto;
  text-align: left;
}

.hr-raeume__format {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 0.45rem;
  box-shadow: 0 20px 45px rgba(17, 17, 17, 0.08);
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.hr-raeume__format:hover {
  background: var(--hr-brown);
  color: #fff;
  box-shadow: 0 26px 55px rgba(0, 0, 0, 0.18);
  transform: translateY(-3px);
}

.hr-raeume__format-no {
  margin: 0 0 1.2rem;
  font-family: var(--hr-sans);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.24em;
}

.hr-raeume__format-name {
  margin: 0 0 0.6rem;
  font-family: var(--hr-serif);
  font-weight: 400;
  font-size: 1.9rem;
  letter-spacing: 0.04em;
}

.hr-raeume__format-tags {
  margin: 0 0 1.2rem;
  font-family: var(--hr-sans);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hr-raeume__format-text {
  margin: 0 0 1.6rem;
  font-size: 1.05rem;
  line-height: 1.6;
}

.hr-raeume__format-cap {
  margin: auto 0 0;
  padding-top: 1rem;
  border-top: 1px solid currentColor;
  border-top-color: rgba(83, 52, 33, 0.18);
  font-size: 1.15rem;
  font-weight: 600;
}

.hr-raeume__format:hover .hr-raeume__format-cap { border-top-color: rgba(255, 255, 255, 0.35); }

.hr-raeume__note {
  margin: 2rem auto 2.2rem;
  font-size: 1rem;
  opacity: 0.85;
}

.hr-raeume__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.9rem 2.2rem;
  border: 1px solid var(--hr-brown);
  border-radius: 0.3rem;
  color: var(--hr-brown);
  text-decoration: none;
  font-family: var(--hr-sans);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  transition: background 0.3s ease, color 0.3s ease;
}

.hr-raeume__cta:hover,
.hr-raeume__cta:focus-visible {
  background: var(--hr-brown);
  color: #fff;
  outline: none;
}

/* ---------- Tablet & Handy ---------- */
@media (max-width: 960px) {
  .hr-raeume { padding: 5rem 0 4rem; }
  .hr-raeume__inner { padding: 0 1.25rem; }

  .hr-raeume__stage {
    grid-template-columns: 1fr;
  }

  .hr-raeume__visual {
    top: 0;
    height: auto;
    padding: 0.75rem 0 0.5rem;
    background: var(--hr-bg);
    z-index: 2;
  }

  .hr-raeume__visual::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2.5rem;
    height: 2.5rem;
    background: linear-gradient(var(--hr-bg), rgba(247, 244, 239, 0));
    pointer-events: none;
  }

  .hr-raeume__card {
    padding: 0.8rem 0.8rem 0.7rem;
    box-shadow: 0 6px 16px rgba(17, 17, 17, 0.07);
  }
  .hr-raeume__cardlabel { display: none; }
  .hr-raeume__cardhead { justify-content: flex-start; margin-bottom: 0.6rem; }
  .hr-raeume__counter-name { min-width: 0; text-align: left; }
  .hr-raeume__pin { width: 1.6rem; height: 1.6rem; font-size: 0.8rem; }
  .hr-raeume__progress { margin-top: 0.7rem; }

  .hr-raeume__step {
    min-height: calc(78vh + (var(--n, 1) - 1) * 65vh);
    padding-bottom: 1.5rem;
  }

  .hr-raeume__vars { margin-bottom: 1.4rem; }

  .hr-raeume__facts > div { grid-template-columns: 7.5rem 1fr; }

  .hr-raeume__grid { grid-template-columns: 1fr; }
}

@media (max-width: 960px) and (orientation: landscape) and (max-height: 520px) {
  .hr-raeume__visual { position: relative; }
}

@media (prefers-reduced-motion: reduce) {
  .hr-raeume__zoom,
  .hr-raeume__dim,
  .hr-raeume__shape,
  .hr-raeume__step,
  .hr-raeume__var,
  .hr-raeume__progress span { transition: none; }
  .hr-raeume__facts > div[data-var] { animation: none; }
  .hr-raeume__card { transform: none !important; }
}
