/* ==========================================================================
   NASHORN – Final touches
   Developed by webndo

   Shared desktop polish. Loaded last so one CTA, eyebrow, heading
   and cursor system wins over earlier section sheets.
   ========================================================================== */

.h-em {
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Navigation: rolling label, matching underline, icon-only Downloads
   -------------------------------------------------------------------------- */
.primary-nav__link {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding-block: 0;
  line-height: 1;
}

.primary-nav__toggle {
  height: 28px;
}

.primary-nav__roll {
  --roll-h: 1.6em;
  display: block;
  height: var(--roll-h);
  overflow: hidden;
  line-height: 1;
}

.primary-nav__roll > span {
  display: flex;
  align-items: center;
  height: var(--roll-h);
  line-height: 1;
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.primary-nav__link:hover .primary-nav__roll > span,
.primary-nav__link:focus-visible .primary-nav__roll > span {
  transform: translateY(-100%);
}

.site-header__tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-download {
  display: grid;
  place-items: center;
  flex: none;
  width: 50px;
  height: 50px;
  cursor: pointer;
  border: 1px solid currentColor;
  background: transparent;
  color: var(--text-dark);
  text-decoration: none;
}

.site-header:not(.is-scrolled) .header-download {
  color: #fff;
}

.site-header.is-scrolled .header-download {
  width: 44px;
  height: 44px;
}

body.is-locked .site-header .header-download {
  color: var(--text-dark);
}

.header-download:hover,
.header-download:focus-visible {
  color: var(--nashorn-blue);
}

.icon-roll {
  display: block;
  height: 16px;
  overflow: hidden;
}

.icon-roll .icon {
  display: block;
  width: 16px;
  height: 16px;
  stroke-width: 1.6;
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.header-download:hover .icon-roll .icon,
.header-download:focus-visible .icon-roll .icon,
.cta .btn--secondary:hover .icon-roll .icon,
.cta .btn--secondary:focus-visible .icon-roll .icon {
  transform: translateY(-100%);
}

/* --------------------------------------------------------------------------
   Secondary CTA: underline only, arrow exits right and returns on the left
   -------------------------------------------------------------------------- */
.btn--secondary {
  --btn-bg: transparent;
  --btn-border: transparent;
  --btn-fg: var(--text-dark);
  min-height: 0;
  padding: 0 0 7px;
  gap: 8px;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--btn-fg);
}

.btn--secondary::before {
  content: none;
}

.btn--secondary::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  height: 1px;
  background: currentColor;
  transform: scaleX(1);
  transform-origin: left center;
}

.btn--secondary:hover::after,
.btn--secondary:focus-visible::after {
  animation: secondary-line 460ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes secondary-line {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.btn--secondary .btn__in,
.btn--secondary .btn__out {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
}

.btn--secondary .icon {
  width: 16px;
  height: 16px;
}

.btn--secondary .btn__in {
  width: 0;
  opacity: 0;
  overflow: hidden;
  transform: translate(-8px, 8px);
  transition:
    width 280ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 220ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.btn--secondary .btn__out {
  margin-left: 8px;
  transition:
    opacity 180ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.fb01-story__cta.btn--secondary .btn__out,
.engineering__cta.btn--secondary .btn__out {
  margin-left: 16px;
}

.btn--secondary .btn__label {
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.btn--secondary:hover .btn__label,
.btn--secondary:focus-visible .btn__label {
  transform: translateX(6px);
}

.btn--secondary:hover .btn__out,
.btn--secondary:focus-visible .btn__out {
  opacity: 0;
  transform: translate(10px, -10px);
}

.btn--secondary:hover .btn__in,
.btn--secondary:focus-visible .btn__in {
  width: 16px;
  opacity: 1;
  transform: none;
  transition-delay: 120ms;
}

.btn--secondary:hover .btn__icon,
.btn--secondary:focus-visible .btn__icon {
  transform: none;
}

.btn--secondary--light {
  --btn-fg: #fff;
  color: #fff;
}

.fb01-story__cta.btn--secondary,
.fb01-story__cta.btn--secondary:hover,
.fb01-story__cta.btn--secondary:focus-visible {
  position: relative;
  margin-top: 8px;
  padding: 0 32px 7px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  gap: 0;
  font-size: 0.75rem;
}

.fb01-story__cta.btn--secondary .btn__in,
.fb01-story__cta.btn--secondary .btn__out {
  position: absolute;
  top: 0;
  width: 16px;
  margin: 0;
}

.fb01-story__cta.btn--secondary .btn__in {
  left: 0;
}

.fb01-story__cta.btn--secondary .btn__out {
  right: 0;
}

.fb01-story__cta.btn--secondary:hover .btn__in,
.fb01-story__cta.btn--secondary:focus-visible .btn__in {
  width: 16px;
}

.fb01-story__cta.btn--secondary:hover .btn__label,
.fb01-story__cta.btn--secondary:focus-visible .btn__label {
  transform: translateX(32px);
}

.fb01-story__cta.btn--secondary:hover .icon,
.fb01-story__cta.btn--secondary:focus-visible .icon,
.engineering__cta.btn--secondary:hover .icon,
.engineering__cta.btn--secondary:focus-visible .icon {
  transform: none;
}

.engineering__cta.btn--secondary,
.engineering__cta.btn--secondary:hover,
.engineering__cta.btn--secondary:focus-visible {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 0 7px;
  gap: 0;
}

/* Homepage secondary CTAs keep one fixed footprint while the arrow swaps sides. */
.home-page .cta-swap.btn--secondary,
.home-page .cta-swap.btn--secondary:hover,
.home-page .cta-swap.btn--secondary:focus-visible {
  position: relative;
  padding-right: 32px;
}

.home-page .cta-swap.btn--secondary .btn__in,
.home-page .cta-swap.btn--secondary .btn__out {
  position: absolute;
  top: 0;
  width: 16px;
  margin: 0;
}

.home-page .cta-swap.btn--secondary .btn__in {
  left: 0;
}

.home-page .cta-swap.btn--secondary .btn__out {
  right: 0;
}

.home-page .cta-swap.btn--secondary:hover .btn__in,
.home-page .cta-swap.btn--secondary:focus-visible .btn__in {
  width: 16px;
}

.home-page .cta-swap.btn--secondary:hover .btn__label,
.home-page .cta-swap.btn--secondary:focus-visible .btn__label {
  transform: translateX(32px);
}

@media (max-width: 1199.98px) {
  .about .about__cta .btn__out {
    margin-left: 0;
  }
}

/* --------------------------------------------------------------------------
   Major section rhythm and shared non-hero heading size
   -------------------------------------------------------------------------- */
@media (min-width: 1200px) {
  .product-lines,
  .engineering {
    padding-block: var(--space-major);
  }

  .product-lines .h2,
  .engineering .h2,
  .js .news__head .h2 {
    font-size: var(--fs-h2-md);
    line-height: 1.16;
    letter-spacing: var(--display-tracking, -0.024em);
  }

  .product-lines__head {
    display: block;
    padding-inline: 0;
  }

  .product-lines__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
  }

  .product-lines__meta .eyebrow {
    margin-bottom: 0;
  }

  .product-lines__title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px 48px;
    align-items: end;
    width: 100%;
    max-width: none;
    margin-bottom: 80px;
  }

  .product-lines__title-row .h2 {
    margin: 0;
  }

  .product-lines__title-row .section-head__text {
    max-width: none;
    margin: 0;
  }

  .hero .hero__lead {
    max-width: 40rem;
    font-size: 1rem;
    line-height: 1.45;
  }
}

/* --------------------------------------------------------------------------
   Hero hotspots: blue, larger, pulsing, plus
   -------------------------------------------------------------------------- */
.hero-spot__marker {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 0;
  background: var(--nashorn-blue);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
}

.hero-spot__marker::before {
  content: "+";
}

.hero-spot.is-active .hero-spot__marker {
  background: var(--nashorn-blue);
}

.hero .hero__actions,
.cta__actions {
  align-items: baseline;
}

.hero .hero__actions {
  gap: 28px;
}

.hero .btn--secondary {
  padding-bottom: 2px;
}

.hero .btn--secondary .btn__label,
.hero .btn--secondary:hover .btn__label,
.hero .btn--secondary:focus-visible .btn__label,
.cta .btn--secondary .btn__label,
.cta .btn--secondary:hover .btn__label,
.cta .btn--secondary:focus-visible .btn__label {
  transform: none;
}

.hero__mark {
  transform: scaleX(-1);
}

.eyebrow {
  gap: 14px;
}

.eyebrow::before {
  margin-left: 4px;
}

.featured .eyebrow--badge {
  border-radius: 0;
}

.news__all {
  text-transform: uppercase;
}

.hotspot__num {
  font-size: 13px;
  font-weight: 500;
  color: var(--nashorn-blue);
}

.hotspot:hover .hotspot__num,
.hotspot:focus-visible .hotspot__num,
.hotspot.is-active .hotspot__num {
  color: #fff;
}

.showroom__plus {
  fill: #fff;
  font-family: var(--font-ui);
  font-size: 5px;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Über Nashorn icons sit on the same left edge as their titles
   -------------------------------------------------------------------------- */
.about .highlight-list__icon {
  margin-left: -10px;
}

/* --------------------------------------------------------------------------
   Back to top
   -------------------------------------------------------------------------- */
.to-top {
  position: fixed;
  top: 50%;
  right: -40px;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--nashorn-blue);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: center;
  transition:
    opacity 420ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.to-top.is-on {
  opacity: 1;
  pointer-events: auto;
}

.to-top:hover,
.to-top:focus-visible {
  transform: translateY(calc(-50% - 6px)) rotate(-90deg);
}

.to-top__arrow {
  display: block;
  width: 30px;
  height: 14px;
}

.to-top:focus-visible {
  outline: 2px solid var(--nashorn-blue);
  outline-offset: 4px;
}

/* --------------------------------------------------------------------------
   Custom cursor — buttons and cards only, direct tracking
   -------------------------------------------------------------------------- */
.cursor {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  html.has-cursor :is(
    a.btn,
    .product-card,
    .world-card,
    .pcard__link,
    .application-card,
    .category-card,
    .news-card,
    .about__tile,
    .fb01-story__cta,
    .engineering__cta,
    .about__cta,
    .news__all,
    .to-top,
    .menu-toggle,
    .primary-nav__toggle
  ) {
    cursor: none;
  }

  html.has-cursor :is(
    a.btn,
    .product-card,
    .world-card,
    .pcard__link,
    .application-card,
    .category-card,
    .news-card,
    .about__tile,
    .fb01-story__cta,
    .engineering__cta,
    .about__cta,
    .news__all,
    .to-top,
    .menu-toggle,
    .primary-nav__toggle
  ) * {
    cursor: none !important;
  }

  html.has-cursor .cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 500;
    display: grid;
    place-items: center;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 50%;
    background: var(--nashorn-blue);
    color: #fff;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(var(--cx, -40px), var(--cy, -40px), 0);
    transition:
      width 160ms cubic-bezier(0.22, 1, 0.36, 1),
      height 160ms cubic-bezier(0.22, 1, 0.36, 1),
      margin 160ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity 120ms linear;
  }

  html.has-cursor .cursor.is-on {
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    opacity: 1;
  }

  html.has-cursor .cursor svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
}

/* Urbach: square stays on the point; logo sits beside it, name under the logo */
.showroom__core {
  fill: var(--nashorn-blue);
  stroke: none;
  transform-box: fill-box;
  transform-origin: center;
  animation: urbach-square-pulse 2.8s cubic-bezier(0.45, 0.02, 0.2, 1) infinite;
}

.showroom__place {
  font-size: 5px;
}

.js .showroom__brand {
  opacity: 0;
}

.js .showroom.is-in .showroom__brand {
  opacity: 1;
  transition: opacity 420ms ease 1760ms;
}

.js .showroom.is-cinematic .showroom__brand {
  opacity: var(--mark);
  transition: none;
}

@keyframes urbach-square-pulse {
  0%, 100% { opacity: 1; scale: 1; }
  50% { opacity: 0.8; scale: 1.08; }
}

@media (prefers-reduced-motion: reduce) {
  .primary-nav__roll > span,
  .btn--secondary .btn__in,
  .btn--secondary .btn__out,
  .btn--secondary .btn__label,
  .to-top {
    transition: none;
  }

  .btn--secondary:hover::after,
  .btn--secondary:focus-visible::after {
    animation: none;
  }

  html.has-cursor .cursor {
    display: none;
  }

  .showroom__core {
    animation: none;
    opacity: 1;
    scale: 1;
  }

  .js .showroom__brand,
  .js .showroom.is-cinematic .showroom__brand {
    opacity: 1;
    transition: none;
  }
}
