/* 98 PAGE TRANSITION (.ptr), z-index band 1000.
   The panel covers the viewport by default so a page that arrives through a
   transition never flashes before the enter animation. If JS never runs, the
   failsafe animation hides it after 2.5s so content stays reachable. */
.ptr {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  overflow: clip;
}
.ptr.is-busy { pointer-events: auto; cursor: progress; }

.ptr .ptr__shade {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  visibility: hidden;
}

.ptr .ptr__panel {
  position: absolute;
  inset: 0;
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
  animation: ptr-failsafe .01s linear 2.5s forwards;
  will-change: transform, clip-path;
}
.ptr.is-js .ptr__panel { animation: none; }
.ptr.is-idle .ptr__panel { visibility: hidden; }

/* dark veil drawn over the panel's own content while it plays the "outgoing page" */
.ptr .ptr__panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #000;
  opacity: var(--ptr-dim, 0);
  pointer-events: none;
}

.ptr .ptr__inner {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 16px;
  padding: calc(var(--gutter) + 8px) var(--gutter);
  max-width: var(--container);
  margin-inline: auto;
}
.ptr .ptr__label,
.ptr .ptr__dest { color: var(--steel); }
.ptr .ptr__dest { color: var(--white); }

.ptr .ptr__word {
  align-self: end;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(5rem, 2rem + 16vw, 18rem);
  line-height: .82;
  letter-spacing: -.045em;
  color: var(--white);
}

.ptr .ptr__bar {
  position: relative;
  display: block;
  height: 2px;
  background: var(--line-dark);
  overflow: hidden;
}
.ptr .ptr__bar-fill {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
}

@keyframes ptr-failsafe { to { visibility: hidden; } }

@media (max-width: 834px) {
  .ptr .ptr__word { font-size: clamp(4rem, 1rem + 22vw, 11rem); }
}
