/* ---------------------------------------------------------------
   One type system across every page: monospace, 12px, mixed case,
   no letter-spacing. Black on white for the shop, white on black
   for the holding page.
   --------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  display: block;
  max-width: 100%;
}

/* The hidden attribute loses to display:flex without this. */
[hidden] {
  display: none !important;
}

/* Visible only to screen readers. */
.sr {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Off-screen rather than display:none, so bots still find it. */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ---------------------------------------------------------------
   masthead — logo over a live clock, on every page
   --------------------------------------------------------------- */

.mast {
  padding: 24px 16px 0;
  text-align: center;
}

.mast img {
  margin: 0 auto;
  width: 112px;
}

.clock {
  margin: 10px 0 0;
}

/* ---------------------------------------------------------------
   gate (index.html)
   --------------------------------------------------------------- */

/* ---------------------------------------------------------------
   "life is a gamble" backdrop

   Two stacked copies of the same wall of text. .bg-base is always
   faintly there and breathes; .bg-reveal is bright but masked to a
   soft circle that bg.js moves with the pointer. Both take their
   colour from one chrome gradient clipped to the glyphs, so the
   sheen runs across the whole viewport rather than per line.
   --------------------------------------------------------------- */

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.bg-layer {
  position: absolute;
  inset: 0;
  margin: 0;
  font-size: 14px;
  line-height: 22px;
  letter-spacing: 0.04em;
  word-break: break-all;
  background-image: linear-gradient(
    170deg,
    #ffffff 0%,
    #6e6e6e 18%,
    #ffffff 34%,
    #4a4a4a 52%,
    #e8e8e8 68%,
    #5a5a5a 84%,
    #ffffff 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Starts invisible and stays that way unless bg.js raises it, so a
   script failure or a device with no pointer shows nothing rather
   than a wall of text. bg.js writes mask-image every frame. */
.bg-reveal {
  opacity: 0;
  -webkit-mask-image: none;
  mask-image: none;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-composite: source-over;
  mask-composite: add;
}

/* Keep the page itself above the backdrop. */
body.gate > *:not(.bg) {
  position: relative;
  z-index: 1;
}

body.gate {
  background: #000;
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

body.gate .mast img {
  width: 240px;
  max-width: 68vw;
}

body.gate .clock {
  color: #8a8a8a;
}

.gate-mark {
  margin-bottom: 28px;
}

.gate-tagline {
  margin: 0 0 22px;
  color: #fff;
}

.gate-form {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #fff;
  padding-bottom: 4px;
  width: 280px;
  max-width: 72vw;
}

.gate-form input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: #fff;
  font: inherit;
  padding: 0;
}

.gate-form input::placeholder {
  color: #8a8a8a;
}

.gate-form button {
  background: transparent;
  border: 0;
  color: #fff;
  font: inherit;
  padding: 0;
  min-height: 44px;
  cursor: pointer;
}

.gate-form button:disabled {
  color: #8a8a8a;
  cursor: default;
}

.gate-form-password {
  margin-top: 16px;
}

.gate-note {
  margin: 16px 0 0;
  width: 280px;
  max-width: 72vw;
  min-height: 18px;
  color: #8a8a8a;
}

.gate-note[data-state="error"] {
  color: #fff;
}

.gate-fine {
  margin: 4px 0 0;
  width: 280px;
  max-width: 72vw;
  color: #8a8a8a;
}

.gate-toggle {
  margin-top: 32px;
  background: transparent;
  border: 0;
  color: #8a8a8a;
  font: inherit;
  padding: 0;
  min-height: 44px;
  cursor: pointer;
}

.gate-toggle:hover {
  color: #fff;
  text-decoration: underline;
}

.gate-foot {
  position: fixed;
  bottom: 16px;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  color: #8a8a8a;
}

/* ---------------------------------------------------------------
   shop (store.html and the information pages)
   --------------------------------------------------------------- */

body.shop {
  background: #000;
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.product {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 72px 16px 96px;
}

.product-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: flex-start;
  max-width: 1120px;
  width: 100%;
}

/* The product renders are 240x360 with transparent backgrounds, so
   they need no panel behind them — they sit straight on the black.
   Capped at 400px so they are not upscaled past the point where the
   holographic detail turns to mush. */
.gallery {
  flex: 1 1 400px;
  min-width: 0;
  max-width: 400px;
}

.track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;
  cursor: grab;
  outline-offset: 4px;
}

.track::-webkit-scrollbar {
  display: none;
}

.track.dragging {
  cursor: grabbing;
  scroll-snap-type: none; /* snapping fights a drag in progress */
}

.slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  aspect-ratio: 2 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
}

.thumbs {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 14px 0 0;
}

.thumbs button {
  background: transparent;
  border: 1px solid #333;
  padding: 4px;
  cursor: pointer;
  line-height: 0;
}

.thumbs button[aria-pressed="true"] {
  border-color: #fff;
}

.thumbs img {
  width: 42px;
  height: 63px;
  object-fit: contain;
}

.product-info {
  flex: 0 1 340px;
  min-width: 0;
}

.product-info h1 {
  font: inherit;
  margin: 0;
}

.variant {
  margin: 0;
  font-weight: 700;
}

.blurb {
  margin: 12px 0 0;
  font-weight: 700;
}

/* Spec sheet: label column, value column, nothing decorative. */
.spec {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 2px 12px;
  margin: 18px 0 0;
  color: #9a9a9a;
}

.spec dt,
.spec dd {
  margin: 0;
}

.ship-to-label {
  margin: 24px 0 6px;
  color: #9a9a9a;
}

.ship-to {
  display: flex;
  gap: 6px;
}

.ship-to button {
  background: transparent;
  border: 1px solid #333;
  color: #9a9a9a;
  font: inherit;
  padding: 6px 10px;
  min-height: 34px;
  cursor: pointer;
}

.ship-to button[aria-pressed="true"] {
  border-color: #fff;
  color: #fff;
}

.price {
  margin: 28px 0 0;
}

.buy {
  display: block;
  width: 100%;
  margin-top: 14px;
  background: #fff;
  color: #000;
  border: 0;
  font: inherit;
  text-align: center;
  padding: 9px;
  cursor: pointer;
}

.buy:hover {
  text-decoration: none;
  background: #ccc;
}

.ship-note {
  margin: 14px 0 0;
  color: #9a9a9a;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 16px;
  color: #9a9a9a;
}

/* ---------------------------------------------------------------
   information pages
   --------------------------------------------------------------- */

.doc {
  flex: 1;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 64px 16px 96px;
}

.doc h1 {
  font: inherit;
  font-weight: 700;
  margin: 0 0 28px;
}

.doc h2 {
  font: inherit;
  font-weight: 700;
  margin: 28px 0 6px;
}

.doc p,
.doc li {
  margin: 0 0 12px;
}

.doc ul {
  margin: 0 0 12px;
  padding-left: 18px;
}

.doc .todo {
  background: #fff;
  color: #000;
  padding: 0 4px;
}

@media (max-width: 760px) {
  .product {
    padding: 40px 16px 72px;
  }

  .product-inner {
    gap: 32px;
  }

  .gallery,
  .product-info {
    flex: 1 1 100%;
  }

  /* Stacked, a 400px-wide shot eats the whole screen and pushes the
     price and button below the fold. 240px is also the renders'
     native width, so on a phone they are not upscaled at all. */
  .gallery {
    max-width: 240px;
    margin: 0 auto;
  }
}
