/* $BELIEVE — Nonbeliever exile card.
   DOM built by js/gate.js inside #gate's nonbeliever view (shown on
   'I DON'T BELIEVE'). Same HUD-terminal language as gate.css: thin green
   hairline border, letter-spaced caps, a CSS-only barcode texture. */

.gate__view--nonbeliever {
  width: min(90vw, 620px);
}

.nb-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  width: 100%;
  padding: 2rem 1.5rem;
  border: 1px solid var(--believe-green, #b8d62e);
  background: var(--believe-bg, #050603);
  background: color-mix(in srgb, var(--believe-bg, #050603) 92%, var(--believe-green, #b8d62e));
  /* Stamped verdict: the card arrives like a stamp hitting paper -- drops
     in oversized and slightly cocked, overshoots past rest, settles. Keyed
     off the view unhiding (display:none suspends animations; they start
     fresh each time the exile view shows), so gate.js needs no extra class
     for it. */
  animation: stampIn 380ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

@keyframes stampIn {
  0% {
    opacity: 0;
    transform: scale(1.5) rotate(-1.6deg);
  }
  55% {
    opacity: 1;
    transform: scale(0.965) rotate(0.4deg);
    box-shadow: 0 0 46px 0 rgba(138, 144, 124, 0.35);
  }
  78% {
    transform: scale(1.015) rotate(-0.1deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    box-shadow: 0 0 0 0 transparent;
  }
}

.nb-card__barcode {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 22px;
  color: var(--believe-grey, #6a6f5e);
  opacity: 0.8;
  background-image: repeating-linear-gradient(
    90deg,
    currentColor 0 2px,
    transparent 2px 5px,
    currentColor 5px 6px,
    transparent 6px 8px,
    currentColor 8px 12px,
    transparent 12px 15px,
    currentColor 15px 16px,
    transparent 16px 20px
  );
}

/* Scan-shimmer sweep, same micro-life language as hud.css's strips. The
   exile card's file is being re-scanned, endlessly -- grey light, not the
   believer green: this is a records office, not a blessing. The bottom
   strip runs half a cycle out of phase. */
.nb-card__barcode::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 30%,
    color-mix(in srgb, var(--believe-grey, #6a6f5e) 45%, transparent) 50%,
    transparent 70%
  );
  transform: translateX(-101%);
  animation: nbBarcodeScan 7s linear 1.2s infinite;
}

.nb-card__barcode:last-of-type::after {
  animation-delay: 4.7s;
}

@keyframes nbBarcodeScan {
  0% { transform: translateX(-101%); }
  17% { transform: translateX(101%); }
  100% { transform: translateX(101%); }
}

.nb-card__title {
  margin: 0;
  font: 700 clamp(2.4rem, 10vmin, 4.5rem) / 1 'Space Mono', 'Courier New', monospace;
  letter-spacing: 0.05em;
  color: var(--believe-grey, #6a6f5e);
}

.nb-card__status {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: clamp(0.75rem, 1.8vmin, 0.95rem);
  letter-spacing: 0.12em;
  line-height: 1.6;
  color: var(--believe-grey, #6a6f5e);
}

/* The way back -- LORE sec VI's closing line, revealed slow and warm
   after the verdict's cold mechanics have landed: holds dark through the
   stamp + typed status lines, then breathes in over ~2.4s, grey warming
   into the believer green. Rest state is fully AA (green at 0.9 on the
   card mix); the animation only ever approaches it from darkness. */
.nb-card__door {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  line-height: 1.6;
  color: var(--believe-green, #b8d62e);
  opacity: 0.9;
  animation: doorReveal 2.4s ease-out 1.5s both;
}

@keyframes doorReveal {
  0% {
    opacity: 0;
    color: var(--believe-grey, #6a6f5e);
  }
  45% {
    opacity: 0.25;
    color: var(--believe-grey, #6a6f5e);
  }
  100% {
    opacity: 0.9;
    color: var(--believe-green, #b8d62e);
    text-shadow: 0 0 12px rgba(184, 214, 46, 0.35);
  }
}

.nb-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.nb-card__share,
.nb-card__return {
  appearance: none;
  font: inherit;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--believe-grey, #6a6f5e);
  background: none;
  color: var(--believe-grey, #6a6f5e);
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation; /* no double-tap zoom on the card's actions */
  transition: color 120ms ease, border-color 120ms ease;
}

.nb-card__share:hover,
.nb-card__share:focus-visible,
.nb-card__return:hover,
.nb-card__return:focus-visible {
  color: var(--believe-green, #b8d62e);
  border-color: var(--believe-green, #b8d62e);
}

.nb-card__return {
  color: var(--believe-green, #b8d62e);
  border-color: var(--believe-green, #b8d62e);
}

@media (prefers-reduced-motion: reduce) {
  .nb-card,
  .nb-card__door,
  .nb-card__barcode::after {
    animation: none !important;
  }
}

@media (max-width: 480px) {
  .nb-card {
    padding: 1.5rem 1rem;
  }

  /* The base clamp bottoms out at 2.4rem, which is already 274px of
     monospace caps for 11 glyphs -- flush against the card border at 375px
     wide and ~50px past it at the 320px floor. The vw term tracks the card
     (90vw minus the view + card padding) so the word always sits inside
     the frame; letter-spacing eases a notch to buy legibility back at the
     smaller size. */
  .nb-card__title {
    font-size: clamp(1.5rem, 8.4vw, 2.4rem);
    letter-spacing: 0.03em;
  }
}
