@charset "UTF-8";
/* ---------------------------------------------------------------------------
   script.css — the individual script page.

   Loaded after common.css, which supplies every token and the shared chrome
   (overlay nav, fixed wordmark, footer, page-top, transition curtain).
--------------------------------------------------------------------------- */

.p-script {
  position: relative;
  z-index: 3;
  background: var(--c-black);
  padding: clamp(96px, 12vw, 150px) var(--gutter) clamp(60px, 8vw, 110px);
}

/* --- back link ----------------------------------------------------------- */
.p-scriptBack {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(30px, 4vw, 52px);
  font-family: var(--f-mont);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--c-grey-l);
  transition: color var(--d-1) linear;
}

.p-scriptBack::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  transition: width var(--d-1) var(--e-out);
}

.p-scriptBack:hover { color: var(--c-white); }
.p-scriptBack:hover::before { width: 44px; }

/* --- head: title page card + metadata ------------------------------------ */
.p-scriptHead {
  gap: clamp(30px, 5vw, 72px);
  align-items: flex-start;
  margin-bottom: clamp(56px, 8vw, 104px);
}

.p-scriptHead__card {
  flex: 0 0 clamp(200px, 24vw, 300px);
}

/* Lead image: 2:3, matching the gallery card so the two read as the same
   artwork. Holds the poster where there is one, the title page otherwise. */
.p-scriptCard {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: #0b0b0b;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.6);
}

/* Secondary plate beneath it -- the title page, at its real letter ratio. */
.p-scriptHead__alt {
  margin-top: 18px;
  aspect-ratio: 8.5 / 11;
  background: #0b0b0b;
}

.p-scriptHead__altCap {
  margin-top: 8px;
  font-family: var(--f-mont);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--c-grey);
}

.p-scriptHead__meta {
  flex: 1 1 auto;
  min-width: 0;
}

.p-scriptMeta__title {
  font-family: var(--f-en);
  font-size: clamp(32px, 5.2vw, 64px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
}

/* Who wrote the summary is what makes it authoritative -- so it is stated on
   the page, visible to readers and machines alike, not hidden in metadata. */
.p-scriptMeta__provenance {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--c-grey-d);
  margin-bottom: 26px;
}

/* --- watch --------------------------------------------------------------- */
.p-scriptWatch {
  border-top: 1px solid var(--c-line);
  padding-top: clamp(34px, 4vw, 52px);
  margin-bottom: clamp(50px, 7vw, 90px);
}

/* --- viewer -------------------------------------------------------------- */
.p-scriptViewer {
  border-top: 1px solid var(--c-line);
  padding-top: clamp(34px, 4vw, 52px);
}

.p-scriptViewer__bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.p-scriptViewer__label {
  font-family: var(--f-mont);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.32em;
  color: var(--c-white);
}

.p-scriptViewer__note {
  font-size: 11px;
  line-height: 1.7;
  color: var(--c-grey);
  max-width: 46em;
}

/* Page plate. */
.p-scriptViewer__stage {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  aspect-ratio: 8.5 / 11;
  background: #d9d5cb;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.p-scriptViewer__page {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  -webkit-user-drag: none;
  transition: opacity 0.25s linear;
}

.is-loading .p-scriptViewer__page { opacity: 0.25; }

/* Transparent guard above the bitmap: the image is not the click target, so a
   casual right-click or drag finds nothing to act on. Deterrence only. */
.p-scriptViewer__guard {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='210'><text x='10' y='120' transform='rotate(-24 160 105)' font-family='Helvetica,Arial,sans-serif' font-size='16' letter-spacing='3' fill='%23000' fill-opacity='0.06'>PREVIEW COPY</text></svg>");
  background-repeat: repeat;
}

.p-scriptViewer__stage.is-error::after {
  content: "Page unavailable";
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-mont);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: #6a6a6a;
}

/* Controls. */
.p-scriptViewer__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 22px;
}

.p-scriptViewer__btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--c-white);
  transition: background var(--d-1) linear, border-color var(--d-1) linear, opacity var(--d-1) linear;
}

.p-scriptViewer__btn:hover:not(:disabled) { background: var(--c-panel-2); }
.p-scriptViewer__btn:disabled { opacity: 0.28; cursor: default; }

.p-scriptViewer__btn::before {
  content: "";
  width: 9px;
  height: 9px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
}

.p-scriptViewer__btn--prev::before { transform: translateX(2px) rotate(-135deg); }
.p-scriptViewer__btn--next::before { transform: translateX(-2px) rotate(45deg); }

.p-scriptViewer__count {
  font-family: var(--f-mont);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--c-white);
  min-width: 82px;
  text-align: center;
}

.p-scriptViewer__jump {
  width: 62px;
  padding: 7px 8px;
  font-family: var(--f-mont);
  font-size: 11px;
  text-align: center;
  color: var(--c-white);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.p-scriptViewer__jumpLabel {
  font-family: var(--f-mont);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--c-grey);
}

.p-scriptViewer__progress {
  max-width: 820px;
  margin: 20px auto 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.16);
}

.p-scriptViewer__progressBar {
  display: block;
  width: 0;
  height: 100%;
  background: var(--c-white);
  transition: width 0.3s var(--e-out);
}

/* --- responsive ---------------------------------------------------------- */
@media only screen and (max-width: 960px) {
  .p-scriptHead { flex-wrap: wrap; }
  .p-scriptHead__card { flex-basis: 190px; }
}

@media only screen and (max-width: 750px) {
  .p-script { padding-bottom: 120px; }
  .p-scriptHead { gap: 24px; }
  .p-scriptHead__card { flex-basis: 132px; }
  /* The title page is page 1 of the reader anyway -- drop the duplicate. */
  .p-scriptHead__alt,
  .p-scriptHead__altCap { display: none; }
  .p-scriptViewer__controls { gap: 10px; }
  .p-scriptViewer__jumpLabel { display: none; }
}
