/* castlepoint - early-2000s fixed-width layout: one centred metal page on a
   black background. Metal surfaces use the scratched steel texture (metal.jpg).
   Raised parts carry the bevel overlay (bevel.png); recessed screens and pressed
   buttons carry the same bevel turned around (bevel-in.png). Labels are printed
   on the metal; content sits in black screens. Text is rgb(0,255,0); no glow. */

:root {
  --green:     #00ff00;   /* rgb(0,255,0) */
  --green-dim: #00a800;
  --line:      #0f420f;   /* rules inside screens */
  --ink:       #141414;   /* lettering printed on metal */

  --font: "Arimo", Arial, Helvetica, sans-serif;
  --wrap: 780px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.55;
  color: var(--green);
  background: #000;
}
::selection { background: var(--green); color: #000; }

/* ---------- Materials ---------- */
/* Steel texture. Each surface starts at its own spot in the texture
   (--steel-pos, picked at random by castlepoint.js on every load) so no two
   pieces look alike. Bevels are 9-slice overlays drawn just under each
   element's content. */
.page, .screen, .groupbox__body, .pagehead, .btn, .vnav a, .iconbtn {
  --steel: #8c9196 url("metal.jpg") var(--steel-pos, 0 0) / 500px auto;
  position: relative; z-index: 0;
}
.page::before, .btn::before, .vnav a::before, .iconbtn::before, .pagehead::after,
.screen::before, .groupbox__body::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  border: var(--bevel-w, 4px) solid transparent;
  border-image: url("bevel.png") 40 / var(--bevel-w, 4px) stretch;
}

/* The page: one raised steel panel */
.page {
  --bevel-w: 6px;
  max-width: var(--wrap); margin: 16px auto;
  padding: 14px;
  background: var(--steel);
  box-shadow: 0 0 0 1px #000;
}

/* Black screen recessed into the steel: a short bevelled wall, then black */
.screen, .groupbox__body {
  --bevel-w: 5px;
  border: 5px solid transparent;
  background: linear-gradient(#000, #000) padding-box, var(--steel) border-box;
}
.screen::before, .groupbox__body::before {
  inset: -5px;
  border-image-source: url("bevel-in.png");
}

/* CASTLE + green-square wordmark (the square stands in for "point") */
.wm {
  font-weight: bold; text-transform: uppercase; color: #fff;
  white-space: nowrap; letter-spacing: 0.14em; text-decoration: none;
  -webkit-user-select: none; user-select: none;
}
.wm__pt {
  display: inline-block;
  width: 0.44em; height: 0.44em;
  background: var(--green);
  vertical-align: top;
  margin-left: 0.14em;
  margin-top: 0.03em;
}

a { color: var(--green); }
a:not([class]):hover { color: #000; background: var(--green); text-decoration: none; }

/* ---------- Steel buttons: label printed on, sinks in when pressed ---------- */
.btn, .vnav a, .iconbtn {
  --py: 6px; --px: 12px; --push: 0px;
  display: inline-block;
  padding: calc(var(--py) + var(--push)) var(--px) calc(var(--py) - var(--push));
  font-family: var(--font); font-size: 11px; font-weight: bold; line-height: 1.3;
  letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
  color: var(--ink); text-shadow: 0 1px 0 rgba(255,255,255,0.35);
  background: linear-gradient(rgba(255,255,255,0.1), rgba(255,255,255,0.1)), var(--steel);
  border: 0;
  cursor: pointer; vertical-align: middle;
}
.btn:hover, .vnav a:hover, .iconbtn:hover {
  color: #000;
  background: linear-gradient(rgba(255,255,255,0.22), rgba(255,255,255,0.22)), var(--steel);
}
.btn:active, .vnav a:active, .iconbtn:active {
  --push: 1px;
  background: linear-gradient(rgba(0,0,0,0.12), rgba(0,0,0,0.12)), var(--steel);
}
.btn:active::before, .vnav a:active::before, .iconbtn:active::before { border-image-source: url("bevel-in.png"); }
.btn:focus-visible, .vnav a:focus-visible, .iconbtn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.btn.disabled { pointer-events: none; color: #4a4d50; text-shadow: none; }

.btnrow { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

/* ---------- Top row: news ticker, social buttons ---------- */
.topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }   /* every control 30px tall */
.topbar__icons { display: flex; flex: none; gap: 8px; align-items: center; }
.iconbtn { --py: 0px; --px: 0px; width: 30px; height: 30px; display: grid; place-items: center; }  /* same size for every icon */
.iconbtn svg { display: block; }

.newsbar { flex: 1; min-width: 0; height: 30px; display: flex; align-items: stretch; gap: 8px; }
.newsbar__label { flex: none; display: flex; align-items: center; --py: 0px; --px: 10px; }
.newsbar__track { flex: 1; min-width: 0; padding: 1px 2px; }
.newsbar__clip { overflow: hidden; height: 100%; display: flex; align-items: center; }
.newsbar__run {
  display: flex; flex: none; white-space: nowrap;
  animation: newsbar var(--dur, 30s) linear infinite;
}
.newsbar__track:hover .newsbar__run { animation-play-state: paused; }
.newsbar__copy { display: flex; flex: none; }
.newsbar__item { display: inline-flex; align-items: center; padding-left: 14px; line-height: 16px; text-decoration: none; }
.newsbar__item .d { color: var(--green-dim); margin-right: 8px; }
.newsbar__item .t { font-weight: bold; }
.newsbar__item:hover .t { color: #000; background: var(--green); }
.newsbar__item::after {               /* green square between headlines */
  content: ""; width: 6px; height: 6px; margin-left: 14px; background: var(--green);
}
@keyframes newsbar { to { transform: translateX(-50%); } }

/* ---------- Shell: sidebar + content ---------- */
.shell { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 12px; align-items: start; }

/* Sidebar (left column) */
.brandbox { display: block; padding: 7px 2px; text-align: center; font-size: 19px; line-height: 1.3; }
.vnav { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding: 8px; }
.vnav a { display: block; text-align: right; --px: 10px; }
.vnav__here {                          /* current page: green text, no button */
  display: block; padding: 6px 10px; text-align: right;
  font-size: 11px; font-weight: bold; line-height: 1.3; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--green);
}

/* Content (right column) */
main { min-width: 0; }

/* Page title + intro: a raised steel plate with printed lettering.
   Soft bevel (lightens, soft shadow) under the hard bevel edge. */
.pagehead {
  padding: 11px 16px 13px; margin-bottom: 12px;
  color: var(--ink); text-shadow: 0 1px 0 rgba(255,255,255,0.4);
  background: var(--steel);
}
.pagehead::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  border: 8px solid transparent;
  border-image: url("bevel-soft.png") 28 fill / 8px stretch;
}
.pagetitle { font-size: 18px; font-weight: bold; line-height: 1.3; }
.pagetitle:not(:last-child) {          /* engraved rule under the title */
  padding-bottom: 6px; margin-bottom: 8px;
  border-bottom: 1px solid #5d6266; box-shadow: 0 1px 0 rgba(255,255,255,0.45);
}
.lead { font-size: 13px; }
.pagehead a:not([class]) { color: var(--ink); }
.pagehead a:not([class]):hover { color: #fff; background: var(--ink); text-shadow: none; }
.dim { color: var(--green-dim); }
.center { text-align: center; }

h2, h3 { color: var(--green); }
p { margin-bottom: 9px; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 6px 0 9px 18px; }
ul { list-style: square; }
li { margin-bottom: 4px; }
li::marker { color: var(--green-dim); }
code { font-family: var(--font); padding: 0 4px; border: 1px solid var(--line); }

/* ---------- Sections: label printed on the metal, screen below ---------- */
.groupbox { margin-bottom: 12px; }
.groupbox:last-child { margin-bottom: 0; }
.groupbox__head {
  padding: 1px 2px 5px;
  font-size: 11px; font-weight: bold; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.3;
  color: var(--ink); text-shadow: 0 1px 0 rgba(255,255,255,0.35);
}
.groupbox__body { padding: 12px 14px; }

/* Homepage news list */
.post { margin-bottom: 10px; }
.post__title { font-weight: bold; }
.post p { margin: 2px 0 0; }
.more { margin-top: 10px; }

/* ---------- Misc components ---------- */
.pill {
  display: inline-block; padding: 0 7px;
  font-size: 10px; font-weight: bold; letter-spacing: 0.05em; text-transform: uppercase; line-height: 16px;
  color: var(--green); border: 1px solid currentColor;
}

.grid { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.grid > * { flex: 1 1 260px; margin-bottom: 0; }

/* ---------- Games ---------- */
.game { display: flex; gap: 18px; align-items: flex-start; padding: 14px 0; }
.game:first-child { padding-top: 0; }
.game:last-child { padding-bottom: 0; }
.game + .game { border-top: 1px solid var(--line); }
.game__cover {
  flex: 0 0 160px; width: 160px; height: 120px;
  display: grid; place-items: center; text-align: center;
  font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--green-dim);
  border: 1px solid #1f5c1f;
}
.game__info { flex: 1 1 auto; min-width: 0; }
.game__head { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; margin-bottom: 8px; }
.game__title { font-size: 16px; font-weight: bold; }
.game__desc { margin-bottom: 10px; }
.game__specs { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0 0 12px; font-size: 12px; }
.game__specs li { margin: 0; }
.game__specs .k { display: block; color: var(--green-dim); text-transform: uppercase; font-size: 10px; letter-spacing: 0.5px; }
.game__cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
a.game__cover:hover { border-color: var(--green); }
.game__logo, .game__subtitle { display: block; }
.game__logo img, .game__subtitle { image-rendering: pixelated; }   /* pixel-art logos, scaled by whole steps */

/* ---------- Game pages ---------- */
.gamepage__banner { padding: 0; margin-bottom: 12px; line-height: 0; }
.gamepage__banner img { display: block; width: 100%; height: auto; }
.gamepage__status { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.shot { display: block; line-height: 0; border: 1px solid var(--line); }
.shot:first-child { grid-column: 1 / -1; }   /* lead shot full width, the rest in pairs */
.shot img { display: block; width: 100%; height: auto; }
.shot:hover { border-color: var(--green); }

/* ---------- Game themes ----------
   Each game has its own look, on its Games listing (.game.theme-<slug>) and
   on its page (.gamepage.theme-<slug>). Its art lives in games/<slug>/. */

/* EXIN 2000: riveted gunmetal, rusted bronze, faded yellow stencil and green
   phosphor, taken from the game's own title card and interface. */
.theme-exin {
  --exin-plate:   #404848;
  --exin-stencil: #c9bf90;
  --exin-bronze:  #a07448;
  --exin-black:   #070807;
  --exin-lip:     #1f4a24;
  --exin-rivet:   radial-gradient(circle, #8a9292 0 1.4px, #1a1d1d 1.9px 2.6px, transparent 3px);
}
/* Stencilled steel plates: status tags, section labels, spec labels */
.theme-exin .pill,
.gamepage.theme-exin .groupbox__head {
  color: var(--exin-stencil); text-shadow: 1px 1px 0 #000;
  background:
    var(--exin-rivet) left 3px center / 6px 6px no-repeat,
    var(--exin-rivet) right 3px center / 6px 6px no-repeat,
    var(--exin-plate);
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.16), inset -1px -1px 0 rgba(0,0,0,0.45);
}
.theme-exin .pill { padding: 1px 12px; }
.gamepage.theme-exin .groupbox__head { display: inline-block; padding: 3px 16px; margin-bottom: 6px; }
.theme-exin .game__specs .k { color: var(--exin-stencil); }
.theme-exin li::marker { color: var(--exin-bronze); }
/* Screens: near black with a green lip, like the game's slots and CRTs */
.theme-exin .groupbox__body,
.game.theme-exin {
  background: linear-gradient(var(--exin-black), var(--exin-black)) padding-box, var(--steel) border-box;
  box-shadow: inset 0 0 0 1px var(--exin-lip);
}
/* The listing card on the Games page */
.game.theme-exin { padding: 14px; background: var(--exin-black); border: 1px solid var(--exin-plate); }
.game.theme-exin .game__cover { border-color: var(--exin-plate); }
.game.theme-exin a.game__cover:hover { border-color: var(--exin-stencil); }

/* ---------- Team ---------- */
.member { display: flex; gap: 18px; align-items: flex-start; padding: 14px 0; }
.member:first-child { padding-top: 0; }
.member:last-child { padding-bottom: 0; }
.member + .member { border-top: 1px solid var(--line); }
.member__pfp { width: 120px; height: 120px; flex: 0 0 120px; object-fit: cover; border: 1px solid #1f5c1f; }
.member__pfp--pixel { image-rendering: crisp-edges; image-rendering: pixelated; }
.member__body { flex: 1 1 auto; min-width: 0; }
.member__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.member__name { font-size: 16px; font-weight: bold; }
.member__focus { margin-bottom: 8px; }
.member__contact { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; }
.member__contact li { margin: 0; }
.member__contact .k { color: var(--green-dim); text-transform: uppercase; font-size: 10px; letter-spacing: 0.5px; margin-right: 6px; }

/* ---------- Forms ---------- */
label.field { display: block; margin: 10px 0 3px; font-size: 11px; font-weight: bold; color: var(--green-dim); text-transform: uppercase; letter-spacing: 0.5px; }
input[type=text], input[type=email], textarea, select {
  width: 100%; padding: 6px 8px;
  font-family: var(--font); font-size: 13px;
  color: var(--green); caret-color: var(--green);
  background: #000; border: 1px solid #1f5c1f; border-radius: 0;
}
input::placeholder, textarea::placeholder { color: #1f6b1f; }
input:focus, textarea:focus { outline: none; border-color: var(--green); }
.sent-note { display: none; border: 1px solid var(--green); padding: 6px 10px; margin-bottom: 10px; }
.dirlines { list-style: none; margin: 8px 0 0; }
.dirlines li { padding: 6px 0; margin: 0; }
.dirlines li + li { border-top: 1px solid var(--line); }
.dirlines li:first-child { padding-top: 0; }
.dirlines .lbl { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--green-dim); }
.dirlines a { word-break: break-word; }

/* ---------- Logo lab (prototype only) ---------- */
.lab { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.lab__item { border: 1px solid var(--line); padding: 14px; text-align: center; }
.lab__item.is-current { border-color: var(--green); }
.lab__item img { height: 150px; width: auto; max-width: 100%; display: block; margin: 0 auto 10px; }
.lab__sizes { display: flex; justify-content: center; align-items: flex-end; gap: 14px; margin-bottom: 10px; }
.lab__sizes img { width: auto; margin: 0; }
.lab__name { font-weight: bold; text-transform: uppercase; }

/* ---------- Footer (fine print) ---------- */
.legal { margin-top: 12px; padding: 9px 14px; text-align: center; font-size: 11px; line-height: 1.6; color: var(--green-dim); }
.legal p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .page { margin: 0 auto; }
}
@media (max-width: 680px) {
  .page { padding: 8px; }
  .topbar { gap: 8px; margin-bottom: 8px; }
  .newsbar__label { --px: 8px; }
  .shell { grid-template-columns: 1fr; gap: 8px; }
  .vnav { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); margin-top: 8px; padding: 8px; }
  .vnav a, .vnav__here { text-align: left; }
}
@media (max-width: 540px) {
  .game { flex-direction: column; }
  .game__cover { width: 100%; flex-basis: auto; height: auto; aspect-ratio: 4 / 3; }
  .game__logo img { max-width: 100%; height: auto; }
  .member { flex-direction: column; align-items: center; text-align: center; }
  .member__head, .member__contact { justify-content: center; }
  .lab { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .newsbar__run { animation: none; }
  .newsbar__copy + .newsbar__copy { display: none; }
}
