.nitent-cover-stage {
  --cover-ink: #f5f3ed;
  --cover-muted: #b4b0a7;
  --cover-line: #35332f;
  --cover-gutter: clamp(22px, 2.5vw, 62px);
  --cover-ease: cubic-bezier(.23, 1, .32, 1);
  --cover-card-radius: 7.5% / 5.625%;
  position: relative;
  z-index: 3;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto minmax(340px, 1fr);
  min-height: 100svh;
  background: #000;
  color: var(--cover-ink);
}
.cover-shell { display: contents; }

.cover-header {
  grid-area: 1 / 1;
  margin-inline: var(--cover-gutter);
  min-height: 86px;
  display: grid;
  grid-template-columns: 1fr minmax(0, 1.8fr) 1fr;
  align-items: center;
  font: 500 14px/1.3 Geist, system-ui, sans-serif;
}
.cover-header a { text-decoration: none; color: inherit; }
.cover-brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
.cover-brand img { display: block; width: 25px; height: 25px; object-fit: contain; }
.cover-tagline {
  margin: 0;
  text-align: center;
  color: var(--cover-muted);
  font-weight: 400;
  font-size: clamp(13px, 1.22vw, 17px);
}
.cover-header .cover-get {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-inline: 15px;
  min-height: 44px;
  background: var(--cover-ink);
  color: #111;
  border: 1px solid var(--cover-ink);
  white-space: nowrap;
}
@media (hover: hover) and (pointer: fine) {
  .cover-header .cover-get:hover { background: #000; color: var(--cover-ink); }
}

.cover-copy {
  grid-area: 2 / 1;
  z-index: 2;
  container-type: inline-size;
  margin-inline: var(--cover-gutter);
  padding-top: clamp(32px, 6.05vh, 81px);
}
.nitent-cover-stage .cover-copy h1 {
  color: var(--cover-ink);
  margin: 0;
  font: 400 8.6cqw/1.12 'Nitent Emilys Candy', Georgia, serif;
  font-synthesis: none;
  letter-spacing: -.012em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}
.cover-copy h1 span { display: inline; }

.cover-prints,
.cover-3d {
  grid-area: 3 / 1;
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 0;
  overflow: clip;
}
.cover-prints { container-type: size; perspective: 1050px; }
.cover-3d { pointer-events: auto; touch-action: pan-y; cursor: pointer; }
.cover-3d:focus-visible { outline: 1px solid #d4d0c4; outline-offset: -10px; }
.nitent-cover-stage:has(.cover-3d canvas[data-content-ready="true"]) .cover-prints { visibility: hidden; }
.cover-3d > *, .cover-3d canvas {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
.cover-print {
  --x: 50cqw;
  --y: 56cqh;
  --pitch: 0deg;
  --yaw: 0deg;
  --roll: 0deg;
  --depth: 1;
  position: absolute;
  top: 0;
  left: 0;
  width: clamp(154px, 15.4vw, 266px);
  aspect-ratio: 3 / 4;
  opacity: 0;
  transform: translate3d(calc(var(--x) - 50%), calc(var(--y) - 50%), 0) rotateZ(var(--roll))
    rotateY(var(--yaw)) rotateX(var(--pitch)) scale(var(--depth));
  transform-origin: center;
  pointer-events: none;
  transition: transform 520ms var(--cover-ease), opacity 300ms var(--cover-ease);
  translate: 0 calc(var(--cover-travel, 0) * 36px);
}
.cover-print img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--cover-card-radius);
}
.cover-print[data-position="edge-left"] {
  --x: 16cqw; --y: 70cqh; --yaw: -63deg; --roll: 7deg; --pitch: -9deg; --depth: .86;
  opacity: 1; z-index: 1;
}
.cover-print[data-position="left"] {
  --x: 31cqw; --y: 59cqh; --yaw: -27deg; --roll: 9deg; --pitch: -5deg; --depth: .96;
  opacity: 1; z-index: 2;
}
.cover-print[data-position="center"] {
  --x: 50cqw; --y: 50cqh; --yaw: -4deg; --roll: -3deg; --pitch: -3deg;
  opacity: 1; z-index: 3;
}
.cover-print[data-position="right"] {
  --x: 69cqw; --y: 42cqh; --yaw: 19deg; --roll: -5deg; --pitch: 3deg; --depth: .98;
  opacity: 1; z-index: 2;
}
.cover-print[data-position="edge-right"] {
  --x: 85cqw; --y: 37cqh; --yaw: 64deg; --roll: -7deg; --pitch: 7deg; --depth: .86;
  opacity: 1; z-index: 1;
}
@media (prefers-reduced-motion: no-preference) {
  .nitent-cover-stage[data-opening] .cover-print:not([data-position="away"]) {
    animation: cover-enter 620ms var(--cover-ease) backwards;
  }
  .cover-print[data-position="left"], .cover-print[data-position="right"] { animation-delay: 65ms; }
  .cover-print[data-position="edge-left"], .cover-print[data-position="edge-right"] { animation-delay: 120ms; }
}
@keyframes cover-enter {
  from { opacity: 0; translate: 0 42px; }
}
.cover-definition { margin: 21px auto 0; max-width: 57ch; text-align: center; font: 400 clamp(14px,1.2vw,18px)/1.45 Geist,sans-serif; color:#c6c2b8; }

@media (max-width: 767px) {
  .nitent-cover-stage {
    grid-template-rows: auto auto minmax(250px,1fr);
    --cover-gutter: clamp(19px, 4.6vw, 32px);
  }
  .cover-header {
    min-height: 79px;
    padding-top: max(9px, env(safe-area-inset-top));
    grid-template-columns: 1fr auto;
  }
  .cover-tagline { grid-column: 1 / -1; grid-row: 2; text-align: left; padding-block: 7px 0; }
  .cover-header .cover-get { grid-column: 2; grid-row: 1; gap: 7px; min-height: 44px; padding-inline: 11px; }
  .cover-copy { padding-top: clamp(30px, 7vh, 54px); }
  .nitent-cover-stage .cover-copy h1 { font-size: 15.75cqw; line-height: 1.12; text-align: left; }
  .cover-copy h1 span { display: block; }
  .cover-definition { text-align:left; margin-top:18px; max-width:36ch; }
  .cover-print { width: clamp(91px, 25vw, 167px); }
  .cover-print[data-position="edge-left"] { --x: 9cqw; }
  .cover-print[data-position="left"] { --x: 28cqw; }
  .cover-print[data-position="right"] { --x: 72cqw; }
  .cover-print[data-position="edge-right"] { --x: 91cqw; }

}
@media (prefers-reduced-motion: reduce) {
  .nitent-cover-stage .cover-print { translate: none; transition: none; }
}
@media(min-width:768px) {
 .cover-copy h1 { display:flex; justify-content:center; gap:.22em; }
}
.cover-header { grid-template-columns:1fr minmax(0,1.8fr) auto auto; gap:12px; }
.cover-motion-toggle { border:1px solid #45433c; color:#f5f3ed; background:#000; width:44px; height:44px; font:400 16px/1 Geist,sans-serif; cursor:pointer; }
.cover-motion-toggle:focus-visible { outline:2px solid #f5f3ed; outline-offset:4px; }
.cover-3d { cursor:grab; }
/* Same-origin controllers remain laid out at their native dimensions offscreen.
   Their pixels update the existing curved meshes; they never cover the deck. */
.cover-3d > .cover-texture-source { position:absolute; inset:0 auto auto -10000px; width:300px; height:400px; pointer-events:none; opacity:0; }
.cover-texture-source > iframe { position:absolute; inset:0; width:300px; height:400px; border:0; }
@media(max-width:767px){
 .cover-header { grid-template-columns:1fr 44px auto; gap:8px; }
 .cover-header .cover-get { grid-column:3; }
 .cover-motion-toggle { grid-column:2; grid-row:1; }
}
@media(min-width:768px){
 .cover-header { grid-template-columns:1fr auto auto; position:relative; }
 .cover-header .cover-tagline { position:absolute; left:50%; transform:translateX(-50%); max-width:calc(100% - 400px); }
}

/* Keep the genuine static prints until complete textures reach the screen. */
.cover-3d canvas:not([data-content-ready="true"]){visibility:hidden}
