/* ============================================================================
   COMPONENTS  —  loader, cursor, sparks, neon sign, marquee, barcode,
   project panels, content panels, carousel, CV, 404 and the page curtain.
   ============================================================================ */

/* ------------------------------------------------------------- loader */
.loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition:
    clip-path 0.7s cubic-bezier(0.76, 0, 0.24, 1),
    opacity 0.4s ease;
  clip-path: inset(0 0 0 0);
}
.loader > div {
  width: 100%;
  max-width: 620px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 18px;
}
.loader h3 {
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: clamp(0.8rem, 1.6vw, 1.1rem);
  letter-spacing: 0.06em;
  white-space: nowrap;
  margin: 0;
}
.loader .loading-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  line-height: 1;
  min-width: 3.2ch;
  text-align: center;
  color: var(--black);
}
.loader .bar {
  width: 100%;
  max-width: 620px;
  height: 2px;
  background: var(--black);
  opacity: 0.2;
  margin-top: 18px;
  position: relative;
  overflow: hidden;
}
.loader .bar i {
  position: absolute;
  inset: 0;
  background: var(--black);
  transform-origin: left center;
  transform: scaleX(0);
}
.loader.is-out {
  clip-path: inset(0 0 100% 0);
  opacity: 0.999;
  pointer-events: none;
}

/* ------------------------------------------------------------- cursor */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  --cursor-width: 5px;
  --cursor-branch-offset: 0px;
  opacity: 0;
  transition: opacity 0.25s ease;
  will-change: transform;
}
.cursor.is-visible {
  opacity: 1;
}
.cursor .c {
  height: 0;
  width: 0;
  position: relative;
}
.cursor .plus-sign {
  width: 50px;
  height: 50px;
  position: absolute;
  top: -25px;
  left: -25px;
  pointer-events: none;
  transform-origin: center center;
}
.cursor .plus-sign div {
  backdrop-filter: invert(1);
  -webkit-backdrop-filter: invert(1);
}

.cursor .plus-sign div:nth-child(1) {
  width: var(--cursor-width);
  position: absolute;
  top: calc(-1 * var(--cursor-branch-offset));
  bottom: calc(75% + var(--cursor-branch-offset));
  left: 50%;
  transform: translateX(-50%);
}
.cursor .plus-sign div:nth-child(2) {
  width: var(--cursor-width);
  position: absolute;
  top: 25%;
  bottom: calc(50% + var(--cursor-width) / 2);
  left: 50%;
  transform: translateX(-50%);
  border-bottom-left-radius: 100%;
}
.cursor .plus-sign div:nth-child(3) {
  width: var(--cursor-width);
  position: absolute;
  top: calc(75% + var(--cursor-branch-offset));
  bottom: calc(-1 * var(--cursor-branch-offset));
  left: 50%;
  transform: translateX(-50%);
}
.cursor .plus-sign div:nth-child(4) {
  width: var(--cursor-width);
  position: absolute;
  top: calc(50% + var(--cursor-width) / 2);
  bottom: 25%;
  left: 50%;
  transform: translateX(-50%);
  border-top-right-radius: 100%;
}
.cursor .plus-sign div:nth-child(5) {
  height: var(--cursor-width);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: calc(-1 * var(--cursor-branch-offset));
  right: calc(75% + var(--cursor-branch-offset));
}
.cursor .plus-sign div:nth-child(6) {
  height: var(--cursor-width);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 25%;
  right: calc(50% + var(--cursor-width) / 2);
  border-top-right-radius: 100%;
}
.cursor .plus-sign div:nth-child(7) {
  height: var(--cursor-width);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: calc(75% + var(--cursor-branch-offset));
  right: calc(-1 * var(--cursor-branch-offset));
}
.cursor .plus-sign div:nth-child(8) {
  height: var(--cursor-width);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: calc(50% + var(--cursor-width) / 2);
  right: 25%;
  border-bottom-left-radius: 100%;
}
.cursor.pulse .plus-sign {
  animation: cursor-pulse 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes cursor-pulse {
  0% {
    filter: brightness(1) drop-shadow(0 0 0 var(--background));
  }
  40% {
    filter: brightness(1.9) drop-shadow(0 0 8px var(--background));
  }
  100% {
    filter: brightness(1) drop-shadow(0 0 0 var(--background));
  }
}
.cursor.is-text .plus-sign div:nth-child(2),
.cursor.is-text .plus-sign div:nth-child(4),
.cursor.is-text .plus-sign div:nth-child(6),
.cursor.is-text .plus-sign div:nth-child(8) {
  opacity: 0;
}
.cursor.is-text .plus-sign {
  animation: caret 1.05s steps(2, jump-none) infinite;
}
@keyframes caret {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0.15;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor {
    display: none !important;
  }
  body {
    cursor: auto !important;
  }
}

/* ------------------------------------------------------------- sparks */
#sparks {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10000;
}

/* ---------------------------------------------------------- neon sign */
.sign-c {
  position: fixed;
  top: calc(var(--head-h) + 25%);
  left: calc(var(--gutter) + var(--sidebar-w) + var(--gap) + 10px);
  width: 75px;
  height: 275px;
  border: 1px solid var(--black);
  background: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 7px;
  transform: translateY(-50%);
  transition:
    filter 0.2s ease,
    opacity 0.3s ease;
  box-sizing: border-box;
}
.sign-c:hover {
  filter: brightness(1.08);
}

.sign {
  width: 100%;
  height: 100%;
  border: 1px solid var(--black);
  background: var(--black);
  writing-mode: vertical-lr;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-right: 6px;
  border-radius: 5px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.29);
  filter: contrast(150%) brightness(1.15);
  will-change: transform;
  overflow: hidden;
}
.sign .neon {
  position: relative;
  z-index: 2;
  color: var(--neon-off);
  letter-spacing: 0.06em;
  transition:
    color 0.3s ease,
    text-shadow 0.3s ease;
}
.sign .neon.on {
  color: #fff;
  text-shadow:
    0 0 7px var(--neon-on),
    0 0 21px var(--neon-on),
    0 0 42px var(--neon-on);
}
.safari .sign .neon.on {
  text-shadow: 0 0 10px var(--neon-on);
}

/* CRT aperture grille */
.sign::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle at center,
    transparent 30%,
    rgba(0, 0, 0, 0.82) 70%
  );
  background-size: 3px 3px;
  pointer-events: none;
  z-index: 1;
}
/* glass reflection sweeping down the tube */
.sign::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 40%;
  top: -40%;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 255, 255, 0.07),
    transparent
  );
  z-index: 3;
  pointer-events: none;
  animation: tube-sweep 7s linear infinite;
}
@keyframes tube-sweep {
  to {
    top: 120%;
  }
}

.sign.flicker .neon {
  animation: neon-flicker 1.4s steps(1, end) 1;
}
@keyframes neon-flicker {
  0%,
  6%,
  12% {
    color: var(--neon-off);
    text-shadow: none;
  }
  3%,
  9% {
    color: #fff;
    text-shadow:
      0 0 7px var(--neon-on),
      0 0 21px var(--neon-on);
  }
  15%,
  21% {
    color: #fff;
    text-shadow: 0 0 4px var(--neon-on);
  }
  18% {
    color: var(--neon-off);
    text-shadow: none;
  }
  30% {
    color: #fff;
    text-shadow:
      0 0 7px var(--neon-on),
      0 0 30px var(--neon-on);
  }
  33%,
  40% {
    color: var(--neon-off);
  }
  55% {
    color: #fff;
    text-shadow:
      0 0 10px var(--neon-on),
      0 0 42px var(--neon-on);
  }
  100% {
    color: #fff;
    text-shadow:
      0 0 7px var(--neon-on),
      0 0 21px var(--neon-on),
      0 0 42px var(--neon-on);
  }
}

/* the brackets and bolts that hang the sign on the chassis */
.sign .a1,
.sign .a2 {
  position: absolute;
  left: -19px;
  transform: translateY(-50%);
  width: 16px;
  height: 35px;
  background: var(--metal);
  border: 1px solid var(--black);
  border-left: 0;
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  gap: 3px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.29);
}
.sign .a1 {
  top: 20%;
}
.sign .a2 {
  top: 80%;
}
.sign .a1 > div,
.sign .a2 > div {
  background: var(--black);
  opacity: 0.22;
  border-radius: 50%;
  width: 100%;
  height: 5px;
}
.sign .a3 {
  position: absolute;
  left: 50%;
  top: calc(100% + 17px);
  width: 45px;
  height: 8px;
  background: var(--metal);
  border: 1px solid var(--black);
  border-left: 0;
  border-top-right-radius: 50px;
  border-bottom-right-radius: 50px;
}
.sign .a4 {
  position: absolute;
  left: -19px;
  top: calc(100% + 17px);
  width: 65px;
  height: 8px;
  background: var(--metal);
  border-top: 1px solid var(--black);
  border-bottom: 1px solid var(--black);
}
.sign .a5,
.sign .a6 {
  position: absolute;
  top: 100%;
  width: 10px;
  height: 10px;
  background: var(--metal);
  border: 1px solid var(--black);
  border-radius: 50%;
}
.sign .a5 {
  left: -13px;
}
.sign .a6 {
  right: -13px;
}
.sign .a7,
.sign .a8 {
  position: absolute;
  top: calc(100% + 2.5px);
  width: 6px;
  height: 20px;
  background: var(--metal);
  border-radius: 50px;
}
.sign .a7 {
  right: -10px;
}
.sign .a8 {
  left: -10px;
}

.sign .neon {
  transition:
    color 0.3s ease,
    text-shadow 0.3s ease;
}

/* ------------------------------------------------------------- marquee */
.marquee {
  overflow: hidden;
  width: 100%;
}
.marquee-inner {
  display: flex;
  width: max-content;
  animation: marquee-left 18s linear infinite;
}
.marquee-inner .word {
  display: inline-block;
  white-space: nowrap;
  height: 1em;
  padding-right: 10px;
  font-size: 0.95rem;
}
@keyframes marquee-left {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ------------------------------------------------------------- barcode */
[data-barcode] {
  display: block;
  line-height: 0;
}
[data-barcode] svg.barcode {
  width: 100%;
  height: 100%;
  display: block;
}

/* ------------------------------------------------------- project panels */
section.project {
  --border: var(--black);
  width: 100%;
  height: var(--main-height);
  position: relative;
  background: var(--border);
  overflow: hidden;
  border: 5px solid var(--border);
  box-shadow: inset 0 0 0 2px var(--black);
}
section.project > img,
section.project > canvas.pixel {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  margin: 2px;
  object-fit: cover;
  z-index: 0;
  mask: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 78%,
    rgba(0, 0, 0, 0) 100%
  );
  -webkit-mask: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 78%,
    rgba(0, 0, 0, 0) 100%
  );
  image-rendering: auto;
}
section.project > img.pixel-hidden {
  opacity: 0;
}
section.project canvas.pixel {
  image-rendering: pixelated;
}

section.project > h1 {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  margin: 0 0 12px;
  z-index: 3;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: min(4.4em, 8vw);
  line-height: 1;
  white-space: nowrap;
  color: var(--primary);
  text-align: center;
  text-shadow:
    -2px -2px 0 var(--black),
    2px -2px 0 var(--black),
    -2px 2px 0 var(--black),
    2px 2px 0 var(--black);
}
section.project .project-tag {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 3;
  display: flex;
  gap: 8px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--background);
  text-shadow:
    -1px -1px 0 var(--black),
    1px -1px 0 var(--black),
    -1px 1px 0 var(--black),
    1px 1px 0 var(--black);
}
section.project .project-tag .project-index {
  background: var(--black);
  color: var(--background);
  padding: 2px 6px;
  font-family: var(--font-display);
  text-shadow: none;
}

/* hero panel: half height, dissolves into the page surface */
section.project.hero {
  height: calc(var(--main-height) / 2);
  border: 0;
  box-shadow: none;
  background: var(--background);
}
section.project.hero > img {
  width: 100%;
  height: 100%;
  margin: 0;
}
section.project.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 72%,
    var(--background) 100%
  );
  pointer-events: none;
  z-index: 1;
}
section.project.hero .hero-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  z-index: 2;
  text-align: center;
  padding: 0 20px;
}
section.project.hero .hero-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.4vw, 1.7rem);
  letter-spacing: 0.08em;
  color: var(--black);
}
section.project.hero .hero-copy p {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  margin: 6px 0 0;
  opacity: 0.7;
}

/* entry panels on the journal page are typographic instead of photographic */
section.project.entry-panel {
  background: var(--background);
  border-color: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
}
.entry-face {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 30px;
  text-align: center;
  position: relative;
}
.entry-face h1 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 4.4vw, 3.2rem);
  line-height: 1.05;
  color: var(--black);
  max-width: 18ch;
  text-wrap: balance;
}
.entry-stamp {
  display: flex;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
}
.entry-stamp span {
  border: 1px solid var(--black);
  padding: 3px 9px;
}
.entry-face::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid var(--black);
  opacity: 0.28;
  pointer-events: none;
}

/* ------------------------------------------------------ content panels */
section.content {
  background: var(--background);
  min-height: calc(var(--main-height) / 2 - 2px);
  padding: 14px 16px 18px;
  position: relative;
}
/* on wide screens the hanging sign occupies the left of the main panel, so
   copy is indented clear of it */
@media (min-width: 1101px) {
  section.content {
    padding-left: 118px;
  }
}
.content-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.content-head .lede {
  font-family: var(--font-tech);
  font-weight: 600;
  font-size: clamp(0.95rem, 1.5vw, 1.25rem);
  line-height: 1.28;
  margin: 0;
  max-width: 46ch;
}
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.text-block p {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.62;
  max-width: 62ch;
}
.meta-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.meta-row {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.meta-row h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
  color: var(--background);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  padding: 4px 9px;
}
.pill span {
  height: 1em;
  line-height: 1;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2px;
  margin-top: 14px;
  background: var(--black);
  border: 1px solid var(--black);
}
.fact {
  background: var(--background);
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fact span {
  font-family: var(--font-display);
  font-size: 0.78rem;
}

.content-foot {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--black);
  color: var(--background);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  padding: 8px 14px;
  border: 1px solid var(--black);
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
  position: relative;
  overflow: hidden;
}
.chip span {
  height: 1em;
  line-height: 1;
}
.chip:hover {
  background: var(--background);
  color: var(--black);
  transform: translateY(-1px);
}
.chip::after {
  content: "\2192";
  font-family: var(--font-mono);
}

/* framed secondary plate */
.framed {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}
span.brd {
  display: none;
}
span.brd + .pixelation-wrapper {
  display: flex;
  padding: 12px;
  border: 1px solid var(--black);
  width: max-content;
  max-width: 100%;
  background: var(--background);
}
span.brd + .pixelation-wrapper img {
  margin: 0;
  border-radius: 8px;
  height: auto;
  width: min(720px, 100%);
  max-height: calc(var(--main-height) * 0.42);
  object-fit: cover;
}
.pixelation-wrapper {
  position: relative;
}

/* section marker between hero and the work list */
.section-marker {
  background: var(--background);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-marker .rule {
  flex: 1;
}

/* ------------------------------------------------------------ carousel */
.carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  width: 100%;
  border: 1px solid var(--black);
  overflow-x: auto;
  overflow-y: hidden;
  gap: 30px;
  height: calc(var(--main-height) * 0.62);
  background: var(--primary);
  user-select: none;
  padding: 46px 12px 12px;
  position: relative;
  margin-top: 16px;
}
.carousel .header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  padding-left: 12px;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--black);
}
.carousel .carousel-item {
  box-shadow: 0 0 0 2px var(--black);
  height: calc(100% - 4px);
  display: flex;
}
.carousel .carousel-item span {
  height: 100%;
  display: flex;
}
.carousel img {
  margin: 0;
  height: 100% !important;
  width: auto !important;
  max-height: none;
  object-fit: cover;
  -webkit-user-drag: none;
}

/* ------------------------------------------------------- doc components */
.doc-block h2,
.doc-block h3 {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.doc-block h2 {
  font-size: clamp(1.1rem, 2.4vw, 1.8rem);
}
.doc-block h3 {
  font-size: clamp(0.9rem, 1.6vw, 1.15rem);
}
.doc-block .rule {
  margin-bottom: 14px;
}
.doc-block p {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.65;
  max-width: 68ch;
}
.doc-block ul li {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--black);
  border: 1px solid var(--black);
}
.timeline-row {
  background: var(--background);
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 150px 190px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
}
.timeline-row h3 {
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 0.95rem;
}
.timeline-row p {
  font-size: 0.78rem;
  margin: 0;
  max-width: 60ch;
}

.cv {
  border: 1px solid var(--black);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 560px;
}
.cv h3 {
  font-family: var(--font-display);
}
.cv p {
  font-size: 0.78rem;
}
.contact-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}
.mail-link {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 2.2vw, 1.6rem);
  color: var(--black);
  text-decoration: none;
  border-bottom: 2px solid var(--black);
  padding-bottom: 2px;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}
.mail-link:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* bold runs inside copy get a solid underline bar */
section b {
  font-weight: 700;
  font-family: var(--font-display);
  position: relative;
  display: inline-block;
}
section b::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.1em;
  width: 100%;
  height: 2px;
  background: var(--black);
}

pre {
  background: var(--black);
  color: #fff;
  padding: 12px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  border: 1px solid var(--black);
}

/* ---------------------------------------------------------------- 404 */
section.page404 {
  height: var(--main-height);
  margin-top: 0;
  display: flex;
}
section.page404 > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 100%;
  width: 100%;
  text-align: center;
  padding: 20px;
}
section.page404 h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 8rem);
  line-height: 1;
}
section.page404 h3 {
  font-family: var(--font-tech);
  font-size: 1.2rem;
}
section.page404 p {
  max-width: 44ch;
  font-size: 0.82rem;
}

/* -------------------------------------------------- end contact panel */
.end-card {
  min-height: calc(var(--main-height) * 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
}
.end-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  padding: 30px 16px;
  width: 100%;
}
.end-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3vw, 2.2rem);
}
.end-inner .pills {
  justify-content: center;
}
.pill-link {
  text-decoration: none;
}
.end-barcode {
  width: min(320px, 70%);
  height: 34px;
  margin-top: 8px;
}

/* ------------------------------------------------------ page curtain */
.page-curtain {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  pointer-events: none;
}
.page-curtain .blade {
  flex: 1;
  background: var(--black);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 0.5s cubic-bezier(0.76, 0, 0.24, 1);
}
.page-curtain.is-in .blade {
  transform: scaleY(1);
}
.page-curtain.is-out .blade {
  transform-origin: bottom center;
  transform: scaleY(0);
  transition: transform 0.62s cubic-bezier(0.76, 0, 0.24, 1);
}
body.has-transition .page-curtain .blade {
  transform: scaleY(1);
  transform-origin: top center;
}

/* --------------------------------------------------------- scroll hint */
.scroll-progress {
  position: fixed;
  right: calc(var(--gutter) + 2px);
  top: calc(var(--gutter) + var(--head-h) + var(--gap));
  bottom: calc(var(--gutter) + 2px);
  width: 6px;
  z-index: 120;
  pointer-events: none;
}
.scroll-progress i {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 0%;
  background: var(--primary);
  transition: height 0.1s linear;
}
