/* masterstyles.co.uk
   Hand-written CSS. No frameworks, no build step, no JavaScript.

   Palette and typography are deliberately plain: black background, silver body
   text, yellow headings, cyan links, grey table borders. That is what a personal
   page actually looked like in 1997 -- no tints, no gradients, no glow. */

/* ------------------------------------------------------------------ reset */

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

body,
h1, h2, p, ul, li { margin: 0; padding: 0; }

ul { list-style: none; }

img {
  max-width: 100%;
  height: auto;
}

/* ------------------------------------------------------------------ shell */

body {
  background-color: #000000;
  background-image: url("/assets/stars.gif");
  background-repeat: repeat;
  color: #c0c0c0;
  font-family: "Times New Roman", Times, serif;
  font-size: 17px;
  line-height: 1.5;
  padding: 24px 16px 48px;
  text-align: center;
}

/* Everything sits in one centred column. */
.page {
  margin: 0 auto;
  max-width: 640px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  background: #c0c0c0;
  color: #000000;
  padding: 8px 16px;
  z-index: 10;
}

/* The old default link colours, adjusted to stay legible on black. */
a         { color: #00ffff; }
a:visited { color: #ff00ff; }
a:hover,
a:focus   { color: #ffff00; }

/* --------------------------------------------------------- rainbow rule */

.rule {
  display: block;
  margin: 20px auto;
  width: 100%;
  max-width: 480px;
  height: 8px;
  image-rendering: pixelated;
}

/* ----------------------------------------------------------------- header */

.banner {
  padding-top: 8px;
}

h1 {
  color: #ffffff;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(1.8rem, 8vw, 3rem);
  font-weight: bold;
  line-height: 1.15;
  overflow-wrap: break-word;
}

.tagline {
  color: #ffff00;
  font-size: 1.1rem;
  font-weight: bold;
  margin-top: 12px;
}

.badge-new {
  vertical-align: middle;
  margin-left: 6px;
  image-rendering: pixelated;
}

.est {
  color: #999999;
  font-size: 0.9rem;
  margin-top: 4px;
}

/* ---------------------------------------------------------------- marquee */

/* A scrolling banner, done with CSS rather than the <marquee> element the
   original would have used -- same effect, still valid HTML. */
.marquee {
  background: #000000;
  border: 2px solid #808080;
  color: #ffffff;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.85rem;
  margin: 22px 0;
  overflow: hidden;
  padding: 5px 0;
  white-space: nowrap;
}

.marquee span {
  display: inline-block;
  padding-left: 100%;
  animation: scroll 30s linear infinite;
}

@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* ------------------------------------------------------------------ main */

.construction {
  display: block;
  margin: 0 auto 24px;
  image-rendering: pixelated;
}

/* A plain bordered box, the way a <table border="2"> used to look. */
.panel {
  background: #000000;
  border: 2px ridge #808080;
  margin: 0 auto;
  padding: 16px 18px;
  text-align: left;
}

.panel + .panel { margin-top: 20px; }

h2 {
  color: #ffff00;
  font-family: "Times New Roman", Times, serif;
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 10px;
  text-align: center;
}

.panel p + p { margin-top: 12px; }

code {
  background: #000000;
  border: 1px solid #808080;
  color: #c0c0c0;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.85em;
  padding: 0 3px;
}

.centre { text-align: center; }

/* The grey slab button of every dialog box of the era. */
.lozenge {
  background: #c0c0c0;
  border: 2px outset #dfdfdf;
  color: #000000;
  display: inline-block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.85rem;
  margin-top: 8px;
  padding: 4px 12px;
  text-decoration: none;
}

.lozenge:visited { color: #000000; }

.lozenge:hover,
.lozenge:focus {
  border-style: inset;
  color: #000000;
}

.globe {
  image-rendering: pixelated;
  margin-top: 6px;
}

/* ---------------------------------------------------------------- footer */

footer {
  margin-top: 8px;
}

.counter-line {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.counter-line img { image-rendering: pixelated; }

.smallprint {
  color: #808080;
  font-size: 0.8rem;
  margin-top: 6px;
}

/* The 88x31 button wall. Capped at four buttons wide (4 x 88px + 3 x 8px gap)
   so it wraps into tidy rows instead of stranding one button on its own. */
.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 22px auto 0;
  max-width: 376px;
}

.buttons img {
  display: block;
  image-rendering: pixelated;
}

.buttons a:hover img,
.buttons a:focus img {
  outline: 2px solid #ffffff;
}

.contact {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 22px;
}

.contact img { image-rendering: pixelated; }

.colophon {
  color: #808080;
  font-size: 0.85rem;
  margin-top: 18px;
}

/* --------------------------------------------------------------- 404 page */

.notfound-code {
  color: #ffffff;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(3rem, 16vw, 6rem);
  font-weight: bold;
  line-height: 1;
}

/* --------------------------------------------------------- reduced motion */

/* The nostalgia is optional; the readability is not. */
@media (prefers-reduced-motion: reduce) {
  .marquee span {
    animation: none;
    padding-left: 0;
    white-space: normal;
  }

  .marquee {
    white-space: normal;
  }
}
