/* Tribunal 1916 landing page. Colours are the game's palette (docs/05-art-style.md section 3). */
@font-face {
  font-family: "Jersey 10";
  src: url("fonts/Jersey10-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Departure Mono";
  src: url("fonts/DepartureMono-Regular.otf") format("opentype");
  font-display: swap;
}

:root {
  --ink: #1F1710;
  --soot: #2F2C25;
  --slate: #3E403E;
  --dark-oak: #49372C;
  --umber-grey: #4C453A;
  --manila: #A68F6A;
  --paper: #E6DEC4;
  --pale-grey: #C4C3BA;
  --glass-grey: #909A9E;
  --red: #A32A22;
  --red-shade: #86221D;
  --label: "Jersey 10", "Courier New", monospace;
  --typed: "Departure Mono", "Courier New", monospace;
  color-scheme: dark;
}

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

html { background: var(--ink); }

body {
  margin: 0;
  background: var(--soot);
  color: var(--paper);
  font-family: var(--typed);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

main, footer {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
}

h1, h2 {
  font-family: var(--label);
  font-weight: normal;
  line-height: 1;
  letter-spacing: 0.02em;
  margin: 0 0 0.5rem;
}

h2 { font-size: 2.25rem; }

a { color: var(--paper); text-underline-offset: 0.2em; }
a:hover { color: var(--pale-grey); }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.small { font-size: 0.8125rem; line-height: 1.5; }

/* Hero: the key art at a whole-number scale, pixels kept square. */
.hero {
  margin: 0 -1rem;
  background: var(--ink);
}

.hero-art {
  display: block;
  width: 100%;
  max-width: 960px; /* half the 1920 capture: whole 2x2 blocks of the game's 4x pixels */
  height: auto;
  margin: 0 auto;
}

.hero-text {
  padding: 1.5rem 1rem 1rem;
  text-align: center;
  border-bottom: 4px solid var(--dark-oak);
}

h1 {
  font-size: clamp(3.5rem, 14vw, 7rem);
  color: var(--paper);
  text-shadow: 4px 4px 0 var(--ink);
  margin: 0;
}

h1::after {
  content: "";
  display: block;
  width: 60%;
  max-width: 22rem;
  height: 6px;
  margin: 0.75rem auto 0;
  background: var(--red);
}

.hook {
  font-family: var(--label);
  font-size: clamp(1.75rem, 7vw, 2.75rem);
  line-height: 1.1;
  color: var(--pale-grey);
  margin: 1rem 0 0.5rem;
}

section { margin: 2.5rem 0; }

.about p { max-width: 40rem; margin: 0 auto; }

/* Sign-up: a paper slip on the desk. */
.paper {
  background: var(--paper);
  color: var(--ink);
  max-width: 36rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  border: 4px solid var(--manila);
  box-shadow: 6px 6px 0 var(--ink);
}

.paper h2 { color: var(--ink); }
.paper p { margin: 0 0 1rem; }

.signup-form label {
  display: block;
  font-family: var(--label);
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.signup-form .row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.signup-form input {
  flex: 1 1 14rem;
  min-width: 0;
  min-height: 3rem;
  padding: 0.5rem 0.75rem;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 0;
}

.signup-form button {
  flex: 0 0 auto;
  min-height: 3rem;
  padding: 0.25rem 1.5rem;
  font-family: var(--label);
  font-size: 1.75rem;
  line-height: 1;
  color: var(--paper);
  background: var(--red);
  border: 3px solid var(--red-shade);
  border-radius: 0;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
}

.signup-form button:hover { background: var(--red-shade); }
.signup-form button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.signup-form .small { color: var(--dark-oak); }
.signup-form .status { margin: 0; font-weight: bold; color: var(--ink); }
.signup-form .status:empty { display: none; }

/* Screenshots: big captures shown smaller, so they keep normal smoothing to stay legible. */
.shots h2 { text-align: center; margin-bottom: 1.25rem; }

.shots figure {
  margin: 0 0 1.5rem;
}

.shots img {
  display: block;
  width: 100%;
  height: auto;
  border: 4px solid var(--ink);
  background: var(--slate);
}

figcaption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--pale-grey);
}

.clip-placeholder {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  color: var(--glass-grey);
  background: var(--ink);
  border: 4px dashed var(--umber-grey);
}

.clip video {
  display: block;
  width: 100%;
  height: auto;
  border: 4px solid var(--ink);
}

.coming { text-align: center; }
.coming p { max-width: 32rem; margin: 0 auto; }

footer {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  border-top: 4px solid var(--dark-oak);
  color: var(--pale-grey);
  text-align: center;
}

footer p { margin: 0 0 0.5rem; }

@media (min-width: 48rem) {
  body { font-size: 1.0625rem; }
  .hero { margin: 0; }
  .hero-text { padding-top: 2rem; }
  .shots {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
  .shots h2 { grid-column: 1 / -1; margin-bottom: 0; }
  .shots figure { margin: 0; }
  .shots figure:first-of-type { grid-column: 1 / -1; }
  .paper { padding: 2rem; }
}

/* Contact form */
.contact { max-width: 36rem; margin-left: auto; margin-right: auto; }
.contact h2 { text-align: center; }

.contact-form label {
  display: block;
  font-family: var(--label);
  font-size: 1.375rem;
  margin: 0.75rem 0 0.25rem;
}

.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--manila);
  border-radius: 0;
}

.contact-form textarea { resize: vertical; min-height: 8rem; }

.contact-form button {
  margin-top: 1rem;
  min-height: 3rem;
  padding: 0.25rem 1.5rem;
  font-family: var(--label);
  font-size: 1.75rem;
  line-height: 1;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--manila);
  border-radius: 0;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
}

.contact-form button:hover { background: var(--pale-grey); }
.contact-form button:disabled { opacity: 0.6; cursor: wait; }
.contact-form .small { color: var(--pale-grey); margin: 0.75rem 0 0; }
.contact-form .status { margin: 0.5rem 0 0; font-weight: bold; }
.contact-form .status:empty { display: none; }

/* The honeypot: off screen for people, still in the form for bots. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Bridge Street: the street art at whole-number scales only (1x, 2x, 3x of 629 x 270). The band
   breaks out of the text column so it can show at exactly 2x (1258 px) on wide screens. */
.street { margin-left: auto; margin-right: auto; }
.street:not(.pair) .early { display: none; }
.street figure { margin: 0 0 1.5rem; }
.street img {
  display: block;
  width: calc(100% - 8px); /* room for the outline, so it lines up with the shots above */
  margin: 4px auto;
  height: auto;
  outline: 4px solid var(--ink); /* an outline, not a border, so it never shrinks the art */
  background: var(--soot);
}

@media (min-width: 82rem) {
  .street {
    width: calc(1258px + 16px);
    margin-left: 50%;
    transform: translateX(-50%);
  }
  .street img { width: 1258px; margin: 4px; image-rendering: pixelated; }
  .street.pair .street-row { display: grid; grid-template-columns: 637px 637px; gap: 0 0; }
  .street.pair img { width: 629px; }
}
