/* ==========================================================================
   NASHORN – Downloads, brochure reader
   Width comes from .container.container--wide, the homepage/header grid.
   ========================================================================== */

.reader {
  --reader-breath: 16px;
  --reader-overlap: 72px;
  --reader-gap: 72px;
  display: grid;
  grid-template-columns: 510px minmax(0, 1fr);
  align-items: center;
  column-gap: var(--reader-gap);
  padding-top: var(--reader-breath);
  padding-bottom: 0;
}

.reader__copy {
  min-width: 0;
  align-self: center;
  transform: translateY(-18px);
}

.reader__copy > .eyebrow::before {
  margin-left: 4px;
}

.reader__title {
  margin: 0;
  color: var(--navy-900);
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: var(--display-weight, 500);
  line-height: var(--lh-tight);
  letter-spacing: var(--display-tracking, -0.034em);
  text-transform: none;
}

.reader__title > span:first-child {
  display: block;
}

.reader__edition {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.reader__word {
  display: block;
}

/* Same badge as the homepage "Neu" label: .featured .eyebrow--badge */
.reader__edition .eyebrow.eyebrow--badge {
  display: flex;
  gap: 0;
  width: fit-content;
  margin: 0.12em 0 0;
  padding: 7px 12px;
  color: #fff;
  background: var(--nashorn-blue);
  border-radius: 0;
  font-family: var(--font-ui);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  line-height: 1;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}

.reader__edition .eyebrow.eyebrow--badge::before {
  content: none;
}

.reader__lead {
  max-width: 440px;
  margin: 16px 0 0;
  color: #3E4E5C;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.62;
}

.reader__copy > .btn {
  margin-top: 18px;
}

.reader__index {
  margin-top: 52px;
}

.reader__index ol {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(5, auto);
  grid-auto-flow: column;
  column-gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reader__index ol::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--line);
  transform: translateX(-50%);
}

.reader__index button {
  position: relative;
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 1px;
  align-items: center;
  width: 100%;
  padding: 5px 2px 4px 0;
  color: var(--navy-900);
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.reader__index li:nth-child(n + 6) button {
  padding-left: 14px;
}

.reader__num {
  grid-row: 1 / span 2;
  align-self: center;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 0.8;
  letter-spacing: -0.045em;
  color: rgba(13, 28, 39, 0.28);
  transition: color var(--dur-base) var(--ease-out);
}

.reader__name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  transition: transform var(--dur-base) var(--ease-out);
}

.reader__ref {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  color: var(--text-soft);
  font-family: var(--font-ui);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.reader__index .icon {
  width: 15px;
  height: 15px;
  flex: none;
  opacity: 0;
  transform: translateX(-4px);
  transition:
    opacity var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
}

.reader__index button:hover .reader__num,
.reader__index button:focus-visible .reader__num {
  color: var(--nashorn-cyan);
}

.reader__index button:hover .reader__name,
.reader__index button:focus-visible .reader__name {
  transform: translateX(4px);
}

.reader__index button:hover .icon,
.reader__index button:focus-visible .icon,
.reader__index button[aria-current="true"] .icon {
  opacity: 1;
  transform: none;
}

.reader__index button[aria-current="true"] {
  border-bottom-color: var(--nashorn-blue);
}

.reader__index button[aria-current="true"] .reader__num {
  color: var(--nashorn-blue);
}

.reader__index button:focus-visible {
  outline: 2px solid var(--nashorn-blue);
  outline-offset: 3px;
}

.reader__stage {
  position: sticky;
  top: calc(var(--header-h) + var(--reader-breath));
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--header-h) - var(--reader-breath));
  align-self: start;
  padding: 0;
}

.reader__stage::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: var(--reader-overlap);
  right: calc((100vw - min(var(--container-wide), 100vw - 2 * min(var(--gutter), 40px))) / -2);
  background: var(--nashorn-blue);
  pointer-events: none;
}

.reader__viewer {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  outline: none;
  background: transparent;
}

.reader__viewer::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.reader__viewer:focus-visible {
  outline: 2px solid var(--nashorn-blue);
  outline-offset: 4px;
}

.reader__viewer ol {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reader__sheet {
  flex: none;
  width: 100%;
  aspect-ratio: 1480 / 2094;
  background: #fff;
  border: 1px solid rgba(12, 26, 41, 0.16);
}

.reader__sheet img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

@media (max-width: 1099px) {
  .reader {
    grid-template-columns: 1fr;
    row-gap: 28px;
  }

  .reader__stage {
    position: relative;
    top: auto;
    order: -1;
    width: min(100%, 520px);
    height: min(72vh, 760px);
    margin-inline: auto;
  }

  .reader__stage::before {
    right: calc(50% - 50vw);
    left: 28px;
  }

  .reader__copy {
    transform: none;
  }

  .reader__viewer {
    width: 100%;
    height: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reader__name,
  .reader__index .icon,
  .reader__num {
    transition: none;
  }

  .reader__index button:hover .reader__name,
  .reader__index button:focus-visible .reader__name {
    transform: none;
  }
}
