/* Three-panel split hero. The JS expects data-hero-view values: noisy, ours, density. */
.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  padding: 72px;
  display: grid;
  place-items: center;
  text-align: center;
}

.hero::after {
  content: none;
}

.hero-visual {
  --split-one-top: 20%;
  --split-one-bottom: 30%;
  --split-two-top: 69%;
  --split-two-bottom: 81%;
  --split-bar: 6px;
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #07080a;
}

.hero-panel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  opacity: 1;
}

.hero-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-panel-noisy {
  z-index: 1;
  clip-path: polygon(0 0, var(--split-one-top) 0, var(--split-one-bottom) 100%, 0 100%);
}

.hero-panel-ours {
  z-index: 2;
  clip-path: polygon(
    var(--split-one-top) 0,
    var(--split-two-top) 0,
    var(--split-two-bottom) 100%,
    var(--split-one-bottom) 100%
  );
}

.hero-panel-density {
  z-index: 3;
  clip-path: polygon(var(--split-two-top) 0, 100% 0, 100% 100%, var(--split-two-bottom) 100%);
}

.hero-divider {
  position: absolute;
  top: 0;
  z-index: 6;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.36);
  transform: translateX(0);
}

.hero-divider-one {
  --bar-travel: -52vw;
  clip-path: polygon(
    calc(var(--split-one-top) - var(--split-bar)) 0,
    calc(var(--split-one-top) + var(--split-bar)) 0,
    calc(var(--split-one-bottom) + var(--split-bar)) 100%,
    calc(var(--split-one-bottom) - var(--split-bar)) 100%
  );
}

.hero-divider-two {
  --bar-travel: 52vw;
  clip-path: polygon(
    calc(var(--split-two-top) - var(--split-bar)) 0,
    calc(var(--split-two-top) + var(--split-bar)) 0,
    calc(var(--split-two-bottom) + var(--split-bar)) 100%,
    calc(var(--split-two-bottom) - var(--split-bar)) 100%
  );
}

.hero-view-controls {
  position: absolute;
  inset: 34px 0 auto;
  z-index: 4;
  height: 44px;
  pointer-events: none;
}

.hero-view-button {
  position: absolute;
  top: 0;
  font-size: 1.12rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  pointer-events: auto;
  transform: translateX(-50%);
}

.hero-view-button[aria-pressed="true"] {
  border-color: rgba(var(--accent-rgb), 0.72);
  background: rgba(var(--accent-rgb), 0.22);
  color: #ffffff;
}

.hero-view-button[data-hero-view="noisy"] {
  left: 12.5%;
}

.hero-view-button[data-hero-view="ours"] {
  left: 50%;
}

.hero-view-button[data-hero-view="density"] {
  left: 87.5%;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  margin: 0 auto;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.9), 0 1px 3px rgba(0, 0, 0, 0.82);
}

.hero-content::before {
  content: "";
  position: absolute;
  inset: -22px -54px;
  z-index: -1;
  pointer-events: none;
  border-radius: 28px;
  background: rgba(0, 0, 0, 0.33);
  -webkit-filter: blur(30px);
  filter: blur(30px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-family: "Linux Biolinum", Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 auto;
  max-width: 920px;
  font-family: "Linux Biolinum", Arial, sans-serif;
  font-size: 5rem;
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: normal;
}

.title-line,
.title-subtitle {
  display: block;
}

.title-line {
  white-space: nowrap;
}

.title-subtitle {
  color: var(--muted);
  font-size: 0.72em;
  font-style: italic;
  font-weight: 400;
  white-space: nowrap;
}

.authors {
  margin: 12px 0 0;
  margin-inline: auto;
  max-width: 780px;
  color: #ffffff;
  font-size: 1.38rem;
  line-height: 1.28;
}

.resource-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.abstract {
  max-width: 760px;
  margin: 26px 0 0;
  margin-inline: auto;
  color: var(--text);
  font-size: 1.44rem;
  line-height: 1.35;
}

.hero[data-hero-active] .hero-panel {
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0;
  transition: opacity 200ms ease;
}

.hero[data-hero-active] .hero-divider {
  opacity: 0;
  pointer-events: none;
}

.hero.is-bars-entering .hero-divider,
.hero.is-bars-exiting .hero-divider {
  opacity: 1;
}

.hero.is-bars-exiting .hero-panel {
  opacity: 1;
  transition: none;
}

.hero.is-bars-entering .hero-divider {
  animation: hero-bars-enter 260ms cubic-bezier(0.33, 1, 0.68, 1) both;
}

.hero.is-bars-exiting .hero-divider {
  animation: hero-bars-exit 260ms cubic-bezier(0.33, 1, 0.68, 1) both;
}

.hero[data-hero-active="noisy"] .hero-panel-noisy,
.hero[data-hero-active="ours"] .hero-panel-ours,
.hero[data-hero-active="density"] .hero-panel-density {
  z-index: 4;
  opacity: 1;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.hero[data-hero-previous="noisy"] .hero-panel-noisy,
.hero[data-hero-previous="ours"] .hero-panel-ours,
.hero[data-hero-previous="density"] .hero-panel-density {
  z-index: 5;
  opacity: 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.hero[data-hero-bars="noisy"] .hero-divider {
  --bar-travel: 100vw;
}

.hero[data-hero-bars="density"] .hero-divider {
  --bar-travel: -100vw;
}

.hero[data-hero-bars="ours"] .hero-divider-one {
  --bar-travel: -52vw;
}

.hero[data-hero-bars="ours"] .hero-divider-two {
  --bar-travel: 52vw;
}

.hero.is-bars-exiting[data-hero-bars="noisy"] .hero-panel-noisy {
  animation: hero-noisy-expand 260ms cubic-bezier(0.33, 1, 0.68, 1) both;
}

.hero.is-bars-exiting[data-hero-bars="noisy"] .hero-panel-ours {
  animation: hero-ours-shift-right 260ms cubic-bezier(0.33, 1, 0.68, 1) both;
}

.hero.is-bars-exiting[data-hero-bars="noisy"] .hero-panel-density {
  animation: hero-density-shift-right 260ms cubic-bezier(0.33, 1, 0.68, 1) both;
}

.hero.is-bars-entering[data-hero-bars="noisy"] .hero-panel-noisy {
  animation: hero-noisy-collapse 260ms cubic-bezier(0.33, 1, 0.68, 1) both;
}

.hero.is-bars-entering[data-hero-bars="noisy"] .hero-panel-ours {
  animation: hero-ours-collapse-from-right 260ms cubic-bezier(0.33, 1, 0.68, 1) both;
}

.hero.is-bars-entering[data-hero-bars="noisy"] .hero-panel-density {
  animation: hero-density-collapse-from-right 260ms cubic-bezier(0.33, 1, 0.68, 1) both;
}

.hero.is-bars-exiting[data-hero-bars="ours"] .hero-panel-noisy {
  animation: hero-noisy-shrink-left 260ms cubic-bezier(0.33, 1, 0.68, 1) both;
}

.hero.is-bars-exiting[data-hero-bars="ours"] .hero-panel-ours {
  animation: hero-ours-expand 260ms cubic-bezier(0.33, 1, 0.68, 1) both;
}

.hero.is-bars-exiting[data-hero-bars="ours"] .hero-panel-density {
  animation: hero-density-shrink-right 260ms cubic-bezier(0.33, 1, 0.68, 1) both;
}

.hero.is-bars-entering[data-hero-bars="ours"] .hero-panel-noisy {
  animation: hero-noisy-collapse-from-left 260ms cubic-bezier(0.33, 1, 0.68, 1) both;
}

.hero.is-bars-entering[data-hero-bars="ours"] .hero-panel-ours {
  animation: hero-ours-collapse 260ms cubic-bezier(0.33, 1, 0.68, 1) both;
}

.hero.is-bars-entering[data-hero-bars="ours"] .hero-panel-density {
  animation: hero-density-collapse-from-right-edge 260ms cubic-bezier(0.33, 1, 0.68, 1) both;
}

.hero.is-bars-exiting[data-hero-bars="density"] .hero-panel-noisy {
  animation: hero-noisy-shift-left 260ms cubic-bezier(0.33, 1, 0.68, 1) both;
}

.hero.is-bars-exiting[data-hero-bars="density"] .hero-panel-ours {
  animation: hero-ours-shift-left 260ms cubic-bezier(0.33, 1, 0.68, 1) both;
}

.hero.is-bars-exiting[data-hero-bars="density"] .hero-panel-density {
  animation: hero-density-expand 260ms cubic-bezier(0.33, 1, 0.68, 1) both;
}

.hero.is-bars-entering[data-hero-bars="density"] .hero-panel-noisy {
  animation: hero-noisy-collapse-from-left-edge 260ms cubic-bezier(0.33, 1, 0.68, 1) both;
}

.hero.is-bars-entering[data-hero-bars="density"] .hero-panel-ours {
  animation: hero-ours-collapse-from-left 260ms cubic-bezier(0.33, 1, 0.68, 1) both;
}

.hero.is-bars-entering[data-hero-bars="density"] .hero-panel-density {
  animation: hero-density-collapse 260ms cubic-bezier(0.33, 1, 0.68, 1) both;
}

@media (max-width: 980px) {
  .hero {
    padding: 48px;
  }

  .hero-content {
    width: min(820px, 100%);
  }

  .hero h1 {
    max-width: 820px;
    font-size: 3.6rem;
  }

  .hero-view-controls {
    top: 26px;
  }
}

@media (max-width: 739px) {
  .hero {
    padding: 26px 18px;
  }

  .hero-visual {
    --split-bar: 0;
  }

  .hero-divider {
    display: none;
  }

  .hero-panel,
  .hero-panel-noisy,
  .hero-panel-ours,
  .hero-panel-density,
  .hero[data-hero-active] .hero-panel,
  .hero[data-hero-previous] .hero-panel {
    inset: 0;
    width: 100%;
    height: 100%;
    clip-path: none;
    animation: none;
  }

  .hero-panel {
    z-index: 1;
    opacity: 0;
    transition: opacity 360ms ease;
  }

  .hero:not([data-hero-active]) .hero-panel-ours,
  .hero[data-hero-active="noisy"] .hero-panel-noisy,
  .hero[data-hero-active="ours"] .hero-panel-ours,
  .hero[data-hero-active="density"] .hero-panel-density {
    z-index: 3;
    opacity: 1;
  }

  .hero-view-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    inset: 16px 0 auto;
    height: auto;
    padding: 0 10px;
  }

  .hero-view-button {
    position: static;
    min-height: 34px;
    padding: 9px 10px;
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    transform: none;
  }

  .hero-content {
    width: 100%;
    padding-top: 64px;
  }

  .hero-content::before {
    inset: -22px;
  }

  .hero h1 {
    max-width: 100%;
    font-size: 2.35rem;
  }

  .resource-actions {
    gap: 8px;
  }
}

@media (max-width: 479px) {
  .hero h1 {
    font-size: 1.9rem;
  }
}

@media (max-width: 359px) {
  .hero h1 {
    font-size: 1.65rem;
  }
}

@keyframes hero-bars-enter {
  from {
    transform: translateX(var(--bar-travel));
  }

  to {
    transform: translateX(0);
  }
}

@keyframes hero-bars-exit {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(var(--bar-travel));
  }
}

@keyframes hero-noisy-expand {
  from {
    clip-path: polygon(0 0, var(--split-one-top) 0, var(--split-one-bottom) 100%, 0 100%);
  }

  to {
    clip-path: polygon(
      0 0,
      calc(var(--split-one-top) + 100vw) 0,
      calc(var(--split-one-bottom) + 100vw) 100%,
      0 100%
    );
  }
}

@keyframes hero-ours-shift-right {
  from {
    clip-path: polygon(
      var(--split-one-top) 0,
      var(--split-two-top) 0,
      var(--split-two-bottom) 100%,
      var(--split-one-bottom) 100%
    );
  }

  to {
    clip-path: polygon(
      calc(var(--split-one-top) + 100vw) 0,
      calc(var(--split-two-top) + 100vw) 0,
      calc(var(--split-two-bottom) + 100vw) 100%,
      calc(var(--split-one-bottom) + 100vw) 100%
    );
  }
}

@keyframes hero-density-shift-right {
  from {
    clip-path: polygon(var(--split-two-top) 0, 100% 0, 100% 100%, var(--split-two-bottom) 100%);
  }

  to {
    clip-path: polygon(
      calc(var(--split-two-top) + 100vw) 0,
      calc(100% + 100vw) 0,
      calc(100% + 100vw) 100%,
      calc(var(--split-two-bottom) + 100vw) 100%
    );
  }
}

@keyframes hero-noisy-shrink-left {
  from {
    clip-path: polygon(0 0, var(--split-one-top) 0, var(--split-one-bottom) 100%, 0 100%);
  }

  to {
    clip-path: polygon(
      0 0,
      calc(var(--split-one-top) - 52vw) 0,
      calc(var(--split-one-bottom) - 52vw) 100%,
      0 100%
    );
  }
}

@keyframes hero-ours-expand {
  from {
    clip-path: polygon(
      var(--split-one-top) 0,
      var(--split-two-top) 0,
      var(--split-two-bottom) 100%,
      var(--split-one-bottom) 100%
    );
  }

  to {
    clip-path: polygon(
      calc(var(--split-one-top) - 52vw) 0,
      calc(var(--split-two-top) + 52vw) 0,
      calc(var(--split-two-bottom) + 52vw) 100%,
      calc(var(--split-one-bottom) - 52vw) 100%
    );
  }
}

@keyframes hero-density-shrink-right {
  from {
    clip-path: polygon(var(--split-two-top) 0, 100% 0, 100% 100%, var(--split-two-bottom) 100%);
  }

  to {
    clip-path: polygon(
      calc(var(--split-two-top) + 52vw) 0,
      100% 0,
      100% 100%,
      calc(var(--split-two-bottom) + 52vw) 100%
    );
  }
}

@keyframes hero-noisy-shift-left {
  from {
    clip-path: polygon(0 0, var(--split-one-top) 0, var(--split-one-bottom) 100%, 0 100%);
  }

  to {
    clip-path: polygon(
      calc(0% - 100vw) 0,
      calc(var(--split-one-top) - 100vw) 0,
      calc(var(--split-one-bottom) - 100vw) 100%,
      calc(0% - 100vw) 100%
    );
  }
}

@keyframes hero-ours-shift-left {
  from {
    clip-path: polygon(
      var(--split-one-top) 0,
      var(--split-two-top) 0,
      var(--split-two-bottom) 100%,
      var(--split-one-bottom) 100%
    );
  }

  to {
    clip-path: polygon(
      calc(var(--split-one-top) - 100vw) 0,
      calc(var(--split-two-top) - 100vw) 0,
      calc(var(--split-two-bottom) - 100vw) 100%,
      calc(var(--split-one-bottom) - 100vw) 100%
    );
  }
}

@keyframes hero-density-expand {
  from {
    clip-path: polygon(var(--split-two-top) 0, 100% 0, 100% 100%, var(--split-two-bottom) 100%);
  }

  to {
    clip-path: polygon(
      calc(var(--split-two-top) - 100vw) 0,
      100% 0,
      100% 100%,
      calc(var(--split-two-bottom) - 100vw) 100%
    );
  }
}

@keyframes hero-noisy-collapse {
  from {
    clip-path: polygon(
      0 0,
      calc(var(--split-one-top) + 100vw) 0,
      calc(var(--split-one-bottom) + 100vw) 100%,
      0 100%
    );
  }

  to {
    clip-path: polygon(0 0, var(--split-one-top) 0, var(--split-one-bottom) 100%, 0 100%);
  }
}

@keyframes hero-ours-collapse-from-right {
  from {
    clip-path: polygon(
      calc(var(--split-one-top) + 100vw) 0,
      calc(var(--split-two-top) + 100vw) 0,
      calc(var(--split-two-bottom) + 100vw) 100%,
      calc(var(--split-one-bottom) + 100vw) 100%
    );
  }

  to {
    clip-path: polygon(
      var(--split-one-top) 0,
      var(--split-two-top) 0,
      var(--split-two-bottom) 100%,
      var(--split-one-bottom) 100%
    );
  }
}

@keyframes hero-density-collapse-from-right {
  from {
    clip-path: polygon(
      calc(var(--split-two-top) + 100vw) 0,
      calc(100% + 100vw) 0,
      calc(100% + 100vw) 100%,
      calc(var(--split-two-bottom) + 100vw) 100%
    );
  }

  to {
    clip-path: polygon(var(--split-two-top) 0, 100% 0, 100% 100%, var(--split-two-bottom) 100%);
  }
}

@keyframes hero-noisy-collapse-from-left {
  from {
    clip-path: polygon(
      0 0,
      calc(var(--split-one-top) - 52vw) 0,
      calc(var(--split-one-bottom) - 52vw) 100%,
      0 100%
    );
  }

  to {
    clip-path: polygon(0 0, var(--split-one-top) 0, var(--split-one-bottom) 100%, 0 100%);
  }
}

@keyframes hero-ours-collapse {
  from {
    clip-path: polygon(
      calc(var(--split-one-top) - 52vw) 0,
      calc(var(--split-two-top) + 52vw) 0,
      calc(var(--split-two-bottom) + 52vw) 100%,
      calc(var(--split-one-bottom) - 52vw) 100%
    );
  }

  to {
    clip-path: polygon(
      var(--split-one-top) 0,
      var(--split-two-top) 0,
      var(--split-two-bottom) 100%,
      var(--split-one-bottom) 100%
    );
  }
}

@keyframes hero-density-collapse-from-right-edge {
  from {
    clip-path: polygon(
      calc(var(--split-two-top) + 52vw) 0,
      100% 0,
      100% 100%,
      calc(var(--split-two-bottom) + 52vw) 100%
    );
  }

  to {
    clip-path: polygon(var(--split-two-top) 0, 100% 0, 100% 100%, var(--split-two-bottom) 100%);
  }
}

@keyframes hero-noisy-collapse-from-left-edge {
  from {
    clip-path: polygon(
      calc(0% - 100vw) 0,
      calc(var(--split-one-top) - 100vw) 0,
      calc(var(--split-one-bottom) - 100vw) 100%,
      calc(0% - 100vw) 100%
    );
  }

  to {
    clip-path: polygon(0 0, var(--split-one-top) 0, var(--split-one-bottom) 100%, 0 100%);
  }
}

@keyframes hero-ours-collapse-from-left {
  from {
    clip-path: polygon(
      calc(var(--split-one-top) - 100vw) 0,
      calc(var(--split-two-top) - 100vw) 0,
      calc(var(--split-two-bottom) - 100vw) 100%,
      calc(var(--split-one-bottom) - 100vw) 100%
    );
  }

  to {
    clip-path: polygon(
      var(--split-one-top) 0,
      var(--split-two-top) 0,
      var(--split-two-bottom) 100%,
      var(--split-one-bottom) 100%
    );
  }
}

@keyframes hero-density-collapse {
  from {
    clip-path: polygon(
      calc(var(--split-two-top) - 100vw) 0,
      100% 0,
      100% 100%,
      calc(var(--split-two-bottom) - 100vw) 100%
    );
  }

  to {
    clip-path: polygon(var(--split-two-top) 0, 100% 0, 100% 100%, var(--split-two-bottom) 100%);
  }
}
