/* ============================================================
   Gallery site — Y2K light theme
   White paper, black ink, chrome bars, hard borders.
   Display face is Zen Dots (self-hosted, OFL — see
   assets/fonts/OFL.txt). Body is Verdana, which is what the
   web actually looked like in 2001.
   ============================================================ */

@font-face {
  font-family: "Zen Dots";
  src: url("../fonts/ZenDots-Regular.woff2") format("woff2"),
       url("../fonts/ZenDots-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper:     #ffffff;
  --ink:       #000000;
  --grey:      #5a6472;
  --hairline:  #b9c4d0;

  /* chrome, for title bars and raised edges */
  --chrome-hi:  #ffffff;
  --chrome-mid: #dde6ef;
  --chrome-lo:  #a8b8c8;

  --cyan:      #00cfff;
  --cyan-pale: #d4f6ff;
  --magenta:   #ff2d95;
  --mag-pale:  #ffdcef;

  --gutter: clamp(16px, 4vw, 40px);
  --measure: 68ch;

  --display: "Zen Dots", "Trebuchet MS", Verdana, sans-serif;
  --sans: Verdana, Tahoma, Geneva, "DejaVu Sans", sans-serif;

  --hard: 4px 4px 0 var(--ink);
  --hard-sm: 3px 3px 0 var(--ink);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  background-image: radial-gradient(var(--hairline) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--magenta);
  outline-offset: 2px;
}

/* ---------- Top warning strip ---------- */

.alert-strip {
  background: linear-gradient(90deg, var(--cyan-pale), #f3ecff 48%, var(--mag-pale));
  border-bottom: 2px solid var(--ink);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.5;
  padding: 6px var(--gutter);
  text-align: center;
}

.alert-strip span { display: inline-block; max-width: 96ch; }

/* ---------- Masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(180deg, var(--chrome-hi) 0%, var(--chrome-mid) 52%, var(--chrome-lo) 100%);
  border-bottom: 2px solid var(--ink);
}

.masthead-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 28px;
  padding: 12px var(--gutter) 10px;
}

.brand { min-width: 0; }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: clamp(1.15rem, 3.4vw, 1.9rem);
  line-height: 1.15;
  text-decoration: none;
  color: var(--ink);
}

.wordmark .caret {
  display: inline-block;
  width: 0.4em;
  height: 0.72em;
  background: var(--magenta);
  border: 2px solid var(--ink);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.tagline {
  margin: 6px 0 0;
  color: var(--grey);
  font-size: 0.78rem;
}

.mainnav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 2px;
}

.mainnav a {
  font-family: var(--display);
  font-size: 0.72rem;
  text-decoration: none;
  color: var(--ink);
  padding: 6px 13px;
  border: 2px solid var(--ink);
  background: linear-gradient(180deg, #fff 0%, #eef3f8 55%, #d5e0ea 100%);
  box-shadow: 2px 2px 0 var(--ink);
}

.mainnav a:hover {
  background: linear-gradient(180deg, #fff 0%, var(--cyan-pale) 55%, #a9ecff 100%);
}

.mainnav a.here {
  background: linear-gradient(180deg, #fff 0%, var(--mag-pale) 55%, #ffb3da 100%);
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.16);
  transform: translate(2px, 2px);
}

.blurswitch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.blurswitch input { accent-color: var(--magenta); width: 15px; height: 15px; margin: 0; }

/* ---------- Page furniture ---------- */

main { padding: 0 var(--gutter) 70px; }

.wall-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 22px 0 18px;
}

.wall-intro { margin: 0; color: var(--grey); font-size: 0.8rem; }

.pagehead { padding: 34px 0 16px; }

.pagehead h1 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  line-height: 1.2;
  margin: 0;
}

.lede { color: var(--grey); max-width: var(--measure); }
.lede p { margin: 12px 0 0; }

.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.1em; }

.textlink { color: #0033cc; }

.empty-state {
  border: 2px dashed var(--ink);
  background: var(--paper);
  color: var(--grey);
  padding: 40px var(--gutter);
  margin: 18px 0;
  max-width: var(--measure);
}
.empty-state p { margin: 0 0 0.8em; }
.empty-state p:last-child { margin-bottom: 0; }

/* ---------- Tag filter ---------- */

.tagbar { display: flex; flex-wrap: wrap; gap: 7px; }

.tagchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: 0.64rem;
  padding: 5px 12px;
  text-decoration: none;
  border-radius: 999px;
}

.tagchip:hover { background: var(--cyan-pale); }
.tagchip.on { background: var(--magenta); color: #fff; }
.tagchip .tagnum { font-size: 0.6rem; opacity: 0.7; }
.tagchip.small { font-size: 0.6rem; padding: 4px 10px; }

/* ---------- The wall of art ---------- */

.wall { column-count: 4; column-gap: 18px; }

@media (max-width: 1100px) { .wall { column-count: 3; } }
@media (max-width: 760px)  { .wall { column-count: 2; column-gap: 12px; } }
@media (max-width: 420px)  { .wall { column-count: 1; } }

.piece {
  break-inside: avoid;
  page-break-inside: avoid;
  margin: 0 0 20px;
}

.piece-link { display: block; text-decoration: none; }

.piece-frame {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: var(--hard-sm);
  transition: box-shadow 0.1s steps(2), transform 0.1s steps(2);
}

.piece-link:hover .piece-frame,
.piece-link:focus-visible .piece-frame {
  box-shadow: 5px 5px 0 var(--magenta);
  transform: translate(-1px, -1px);
}

.piece img { width: 100%; }
.piece.pixel img { image-rendering: pixelated; }

figcaption {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 2px 0;
  font-size: 0.72rem;
  color: var(--grey);
}

.piece-title {
  font-family: var(--display);
  font-size: 0.66rem;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-adult {
  flex: none;
  border: 2px solid var(--ink);
  background: var(--magenta);
  color: #fff;
  font-family: var(--display);
  font-size: 0.55rem;
  padding: 2px 7px;
  line-height: 1.6;
}

.badge-adult.standalone { display: inline-block; margin: 0 0 14px; }

/* ---------- Blur mode ---------- */

.reveal-hint {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  font-family: var(--display);
  font-size: 0.66rem;
  pointer-events: none;
}

body.blurring .piece.adult:not(.shown) img,
body.blurring .single.adult:not(.shown) .single-stage img,
body.blurring .cart.adult:not(.shown) .cart-art img {
  filter: blur(26px);
  transform: scale(1.06);
}

body.blurring .piece.adult:not(.shown) .reveal-hint,
body.blurring .single.adult:not(.shown) .reveal-hint {
  display: flex;
}

/* ---------- Single piece ---------- */

.single { padding: 24px 0 0; }

.single-stage {
  position: relative;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: var(--hard);
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.single-stage img { max-height: 80vh; width: auto; }
.single.pixel .single-stage img { image-rendering: pixelated; }

.single-meta { padding: 26px 0 0; max-width: var(--measure); }

.single-meta h1 {
  font-family: var(--display);
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  line-height: 1.3;
  margin: 0 0 12px;
}

.single-caption p { margin: 0 0 0.9em; }
.single-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }
.single-date { color: var(--grey); font-size: 0.74rem; margin: 12px 0 0; }

.single-nav {
  display: flex;
  gap: 10px;
  margin: 32px 0 0;
  padding-top: 18px;
  border-top: 2px solid var(--ink);
  font-family: var(--display);
  font-size: 0.68rem;
}

.single-nav a {
  text-decoration: none;
  border: 2px solid var(--ink);
  background: linear-gradient(180deg, #fff, #e3ebf3);
  box-shadow: 2px 2px 0 var(--ink);
  padding: 7px 14px;
}

.single-nav a:hover { background: linear-gradient(180deg, #fff, var(--cyan-pale)); }

.single-nav .off {
  border: 2px solid var(--hairline);
  color: var(--hairline);
  padding: 7px 14px;
}

/* ---------- Games shelf ---------- */

.shelf { display: grid; gap: 20px; margin-top: 22px; }

.cart {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 22px;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: var(--hard);
  padding: 20px;
}

.cart-art {
  background: linear-gradient(160deg, #fff, #e6eef6);
  border: 2px solid var(--ink);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cart-art img { width: 100%; height: 100%; object-fit: cover; }

.cart-blank {
  width: 34px; height: 34px;
  border: 3px solid var(--ink);
  background: var(--cyan);
  transform: rotate(45deg);
}

.cart-body { min-width: 0; }

.cart-body h2 {
  font-family: var(--display);
  font-size: 1.05rem;
  line-height: 1.3;
  margin: 0 0 8px;
}

.cart-status {
  display: inline-block;
  margin: 0 0 10px;
  background: var(--cyan);
  border: 2px solid var(--ink);
  font-family: var(--display);
  font-size: 0.58rem;
  padding: 2px 8px;
}

.cart-blurb { margin: 0 0 16px; color: #333c48; max-width: 60ch; }

.btn-play {
  display: inline-block;
  font-family: var(--display);
  font-size: 0.72rem;
  padding: 9px 22px;
  text-decoration: none;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #9beeff 48%, #00cfff 50%, #67e3ff 100%);
  box-shadow: var(--hard-sm);
}

.btn-play:hover { background: linear-gradient(180deg, #ffffff 0%, #ffc2e2 48%, var(--magenta) 50%, #ff8bc4 100%); }

@media (max-width: 640px) {
  .cart { grid-template-columns: 1fr; gap: 14px; }
  .cart-art { aspect-ratio: 16 / 9; }
}

/* ---------- Links list ---------- */

.linklist {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  max-width: 46ch;
  display: grid;
  gap: 9px;
}

.linklist a {
  display: block;
  padding: 11px 14px;
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: var(--hard-sm);
  font-family: var(--display);
  font-size: 0.7rem;
  text-decoration: none;
}

.linklist a:hover { background: var(--cyan-pale); }

/* ---------- Footer ---------- */

.sitefoot {
  border-top: 2px solid var(--ink);
  background: linear-gradient(180deg, #eef3f8, #d7e2ec);
  padding: 32px var(--gutter) 26px;
  color: #2b333d;
  font-size: 0.76rem;
}

.foot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px 48px;
  max-width: 1200px;
}

.foot-block p { margin: 0 0 0.85em; max-width: 64ch; }

.foot-tail {
  margin: 26px 0 0;
  padding-top: 14px;
  border-top: 2px solid var(--ink);
  font-family: var(--display);
  font-size: 0.6rem;
  line-height: 2.1;
}

.foot-tail a { color: #0033cc; }

/* ============================================================
   The age gate — a system dialog
   ============================================================ */

.gate-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 18px;
  background: var(--paper);
  background-image:
    radial-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(150deg, var(--cyan-pale) 0%, #ffffff 42%, var(--mag-pale) 100%);
  background-size: 22px 22px, auto;
}

.gate-wrap { width: 100%; max-width: 620px; }

.gate-card {
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  animation: gate-in 0.3s steps(4) both;
}

@keyframes gate-in {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to   { opacity: 1; transform: none; }
}

.gate-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 12px;
  border-bottom: 2px solid var(--ink);
  background: linear-gradient(180deg, var(--chrome-hi) 0%, var(--chrome-mid) 52%, var(--chrome-lo) 100%);
}

.gate-eyebrow {
  font-family: var(--display);
  font-size: 0.7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gate-lights { display: flex; gap: 5px; flex: none; }

.gate-lights i {
  width: 12px;
  height: 12px;
  border: 2px solid var(--ink);
  background: var(--chrome-hi);
}

.gate-lights i:first-child { background: var(--cyan); }
.gate-lights i:last-child { background: var(--magenta); }

.gate-inner { padding: clamp(22px, 4.5vw, 34px); }

.gate-heading {
  font-family: var(--display);
  font-size: clamp(1.15rem, 4vw, 1.7rem);
  line-height: 1.3;
  margin: 0 0 16px;
}

.gate-body-text p { margin: 0 0 1em; }

.gate-rules {
  list-style: none;
  margin: 20px 0 26px;
  padding: 0;
  border-top: 2px solid var(--ink);
}

.gate-rules li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.82rem;
  line-height: 1.6;
}

.gate-rules li:last-child { border-bottom: 2px solid var(--ink); }

.rule-mark {
  flex: none;
  width: 11px;
  height: 11px;
  margin-top: 7px;
  border: 2px solid var(--ink);
  background: var(--cyan);
}

.gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
}

.btn-enter {
  flex: 1 1 240px;
  font-family: var(--display);
  font-size: 0.82rem;
  padding: 14px 22px;
  cursor: pointer;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #9beeff 47%, #00cfff 50%, #6fe4ff 100%);
  box-shadow: var(--hard-sm);
}

.btn-enter:hover { background: linear-gradient(180deg, #ffffff 0%, #b6f3ff 47%, #2ad9ff 50%, #8ee9ff 100%); }
.btn-enter:active { transform: translate(3px, 3px); box-shadow: none; }

.btn-leave {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 0.72rem;
  padding: 14px 20px;
  text-decoration: none;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #e3ebf3);
  box-shadow: var(--hard-sm);
}

.btn-leave:hover { background: linear-gradient(180deg, #ffffff, var(--mag-pale)); }
.btn-leave:active { transform: translate(3px, 3px); box-shadow: none; }

.gate-foot {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  color: var(--grey);
  font-size: 0.72rem;
}

.gate-foot p { margin: 0; }

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  .wordmark .caret { animation: none; }
  .gate-card { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
