/*
  volunteerdave — shared stylesheet

  Final colors (WCAG 2.x contrast ratios measured against the card, #1b1b1b):
    --card       #1b1b1b  charcoal content card
    --text       #ececec  body text ................ 14.58:1  (AAA)
    --muted      #b3b3b3  descriptions, footer ......  8.21:1  (AAA)
    --green      #39ff14  links ..................... 12.70:1  (AAA)
    --magenta    #ff3d9a  visited links .............  5.24:1  (AA)
    --ink        #111111  text on filled links/buttons
                          on green 13.93:1 (AAA), on magenta 5.74:1 (AA)
    --wall       #707070  fallback color behind the concrete texture
    --border     #444444  1px card border (decorative)
    --shadow     #050505  hard offset card shadow (decorative)

  The original brief values all passed AA, so none were adjusted.
*/

:root {
  --card: #1b1b1b;
  --text: #ececec;
  --muted: #b3b3b3;
  --green: #39ff14;
  --magenta: #ff3d9a;
  --ink: #111111;
  --wall: #707070;
  --border: #444444;
  --shadow: #050505;

  --font-title: "Redaction 35", Georgia, "Times New Roman", serif;
  --font-body: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  padding: 4.5rem 1.5rem;
  background: var(--wall) url("img/concrete.webp") repeat;
  background-size: 384px 384px; /* 768px source, shown at 2x for sharp tiling */
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.125rem; /* 18px */
  line-height: 1.6;
}

/* ---------- the card ---------- */

.card {
  max-width: 540px;
  margin: 0 auto;
  padding: 2rem 2.25rem 1.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 10px 10px 0 var(--shadow);
}

@media (max-width: 600px) {
  body {
    padding: 0;
  }

  .card {
    max-width: none;
    min-height: 100vh;
    padding: 1.5rem 1.25rem; /* ~20px gutters */
    border: 0;
    box-shadow: none;
  }
}

/* ---------- skip link ---------- */

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--green);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ---------- header + nav ---------- */

.site-header {
  margin-bottom: 1.5rem;
}

.site-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-title);
  font-size: clamp(2.75rem, 11vw, 3.75rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: lowercase;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav li {
  margin: 0;
}

.site-nav li + li::before {
  content: "·" / "";
  padding: 0 0.6rem;
  color: var(--muted);
}

/* ---------- type ---------- */

h1,
h2,
h3 {
  margin: 2rem 0 0.75rem;
  font-family: var(--font-body);
  line-height: 1.2;
  letter-spacing: -0.005em;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

main > :first-child {
  margin-top: 0;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.4rem;
}

li + li {
  margin-top: 0.35rem;
}

strong {
  font-weight: 700;
}

.placeholder {
  border-left: 3px dashed var(--magenta);
  padding-left: 0.9rem;
}

.placeholder-label {
  display: block;
  color: var(--magenta);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- links ---------- */

a {
  /* padding + equal negative margin = room for the hover fill with no layout shift */
  margin: 0 -0.15em;
  padding: 0 0.15em;
  color: var(--green);
  text-decoration-line: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.3em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

a:visited {
  color: var(--magenta);
}

a:hover,
a:focus-visible {
  background-color: var(--green);
  color: var(--ink);
  text-decoration-color: transparent;
}

a:visited:hover,
a:visited:focus-visible {
  background-color: var(--magenta);
  color: var(--ink);
}

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

@media (prefers-reduced-motion: no-preference) {
  a {
    transition: background-color 120ms ease-out, color 120ms ease-out,
      text-decoration-color 120ms ease-out;
  }
}

/* Link exceptions. These come after the rules above so :visited:hover can't override them. */

.skip-link,
.skip-link:visited,
.skip-link:hover {
  margin: 0;
  background-color: var(--green);
  color: var(--ink);
  text-decoration: none;
}

.site-title a,
.site-title a:visited {
  color: var(--text);
  text-decoration: none;
}

.site-title a:hover,
.site-title a:focus-visible,
.site-title a:visited:hover,
.site-title a:visited:focus-visible {
  background-color: transparent;
  color: var(--green);
}

.site-nav a[aria-current="page"]:not(:hover, :focus-visible) {
  color: var(--text);
  text-decoration-color: var(--text);
}

/* ---------- resources list ---------- */

.resources {
  padding: 0;
  list-style: none;
}

.resource + .resource {
  margin-top: 1.25rem;
}

.resource a {
  font-weight: 700;
}

/* A resource that isn't linked yet */
.resource-soon {
  font-weight: 700;
}

.resource p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

/* ---------- 90s bits ---------- */

hr {
  height: 0;
  margin: 2.25rem 0;
  border: 0;
  border-top: 3px dashed var(--green);
  filter: drop-shadow(0 0 4px rgba(57, 255, 20, 0.55));
}

/* Button-style link (Donate). Same look whether visited or not. */
.button,
.button:visited {
  display: inline-block;
  margin: 0.5rem 0 1.25rem;
  padding: 0.85rem 1.6rem;
  background-color: var(--green);
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--shadow);
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

.button:hover,
.button:focus-visible {
  background-color: var(--magenta);
  color: var(--ink);
}

/* ---------- game mount (/operator/) ---------- */

.game-mount {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  margin: 1.5rem 0;
  padding: 1rem;
  background: #000;
  border: 2px dashed var(--green);
  color: var(--muted);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.95rem;
  text-align: center;
}

/* ---------- contact form (/about/) ---------- */

.form-embed {
  margin: 1.5rem 0 1rem;
  border: 2px dashed var(--green);
}

/* Google Forms embeds are white; a solid frame makes that look intentional */
.form-embed:has(iframe) {
  border-style: solid;
}

.form-embed iframe {
  display: block;
  width: 100%;
  height: 1100px; /* adjust to fit your form so it doesn't scroll inside the frame */
  border: 0;
  background: #fff;
}

.form-embed-empty {
  margin: 0;
  padding: 3rem 1rem;
  background: #000;
  color: var(--muted);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.95rem;
  text-align: center;
}

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

.site-footer {
  margin-top: 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer hr {
  margin: 0 0 1.25rem;
}

.site-footer p {
  margin: 0 0 0.75rem;
}

/*
  88x31 badges: not on any page right now, kept for later.
  Markup, placed in the footer above "Back to top":
    <ul class="badges" aria-label="Site badges">
      <li><span class="badge"><span>left</span> <span>right</span></span></li>
    </ul>
  Variants: .badge--magenta, .badge--plain
*/
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.badges li {
  margin: 0;
}

/* 88x31, the classic button size */
.badge {
  display: flex;
  width: 88px;
  height: 31px;
  overflow: hidden;
  border: 1px solid var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-transform: lowercase;
}

.badge span {
  display: grid;
  place-items: center;
  padding: 0 4px;
  text-align: center;
}

.badge span:first-child {
  flex: 0 0 auto;
  max-width: 42px; /* lets "made by" stack onto two lines */
  background: var(--ink);
  color: var(--text);
}

.badge span:last-child {
  flex: 1 1 auto;
  background: var(--green);
  color: var(--ink);
}

.badge--magenta span:last-child {
  background: var(--magenta);
}

.badge--plain span:last-child {
  background: var(--text);
}
