/* Perfect DOS VGA 437 - https://github.com/CP437/PerfectDOSVGA437 */
@font-face {
  font-family: "Perfect DOS VGA 437";
  src: url("/fonts/PerfectDOSVGA437.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* text adventure / amber phosphor palette */
  --color-bg: #0d0d00;
  --color-bg-input: #1a1400;

  --color-text-primary: #ffb000;
  --color-text-secondary: #c8841a;
  --color-text-muted: #7a5500;
  --color-text-highlight: #f0e6d0;

  --color-accent-system: #00cccc;
  --color-accent-danger: #cc3300;

  --color-border: #7a5500;
  --color-border-focus: #ffb000;

  /* theme variables, mapped onto the palette above */
  --accent: var(--color-text-primary);
  --background: var(--color-bg);
  --accent-contrast-color: var(--color-bg);
  --color: var(--color-text-primary);
  --border-color: var(--color-border);
  --article-link-color: var(--color-text-secondary);
  --menu-color: var(--color-bg);
}

body,
pre,
code,
input,
textarea,
button {
  font-family: "Perfect DOS VGA 437", "Fira Code", monospace !important;
}

/* secondary/muted text not covered by the theme's own variables */
.post-meta,
.post-date,
.post-author,
.post-reading-time,
.pagination__title {
  color: var(--color-text-muted) !important;
}

.post-content p {
  color: var(--color-text-secondary);
}

/* form inputs: distinct bg + focus border per the palette */
input,
textarea,
select {
  background: var(--color-bg-input) !important;
  border-color: var(--color-border) !important;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--color-border-focus) !important;
  outline-color: var(--color-border-focus) !important;
}

/* utility classes for use in content (no markup in the theme maps to
   these by default — apply them directly, e.g. {{< rawhtml >}} or a
   custom shortcode): <span class="text-highlight">, <span class="text-system">,
   <span class="text-danger"> */
.text-highlight {
  color: var(--color-text-highlight) !important;
}

.text-system {
  color: var(--color-accent-system) !important;
}

.text-danger {
  color: var(--color-accent-danger) !important;
}

/* home page: West of House opening scene */
.adventure {
  white-space: pre-wrap;
  line-height: 1.6;
}

/* .adventure__room, .adventure__command and .adventure__prompt are used on
   both <p> and heading elements (h1/h2) -- terminal "commands" are real
   headings for screen-reader navigation, but must not pick up the
   browser's default heading size/weight/centering. */
.adventure__room {
  color: var(--color-text-primary);
  font-size: 1em;
  font-weight: bold;
  text-align: left;
  margin: 0 0 0.75em;
}

.adventure__desc {
  color: var(--color-text-secondary);
  margin: 0 0 0.75em;
}

.adventure__score {
  color: var(--color-accent-system);
  margin: 0 0 1.5em;
}

.adventure__dark {
  color: var(--color-accent-danger);
  margin: 0 0 1.5em;
}

.adventure__command {
  color: var(--color-text-primary);
  font-size: 1em;
  font-weight: normal;
  text-align: left;
  margin: 1em 0 0.75em;
}

.adventure__prompt {
  color: var(--color-text-highlight);
  font-size: 1em;
  font-weight: normal;
  text-align: left;
  margin: 0;
}

/* collapsible commands: the heading lives inside <summary> (valid per the
   HTML spec -- summary's content model permits one heading element), so
   screen readers still get a real heading, and the disclosure state
   (expanded/collapsed) is reported natively without any custom JS/ARIA. */
.adventure__details {
  margin: 1em 0 0.75em;
}

.adventure__details summary {
  cursor: pointer;
}

.adventure__details summary::marker {
  color: var(--color-text-muted);
}

.adventure__details summary .adventure__command {
  display: inline;
  margin: 0;
}

.adventure__details > p {
  margin: 0.5em 0 0 1.2em;
}

.adventure__link {
  color: var(--color-text-highlight);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--color-text-muted);
}

.adventure__link:hover,
.adventure__link:focus {
  color: var(--color-accent-system);
  text-decoration-color: var(--color-accent-system);
}

.adventure__cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  margin-left: 0.4em;
  background: var(--color-text-highlight);
  vertical-align: text-bottom;
  animation: adventure-blink 1s steps(1) infinite;
}

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

/* contact page */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  max-width: 32em;
  margin-top: 1.5em;
}

.contact-form label {
  color: var(--color-text-muted);
  margin-top: 0.5em;
}

.contact-form button[type="submit"] {
  margin-top: 1em;
  align-self: flex-start;
}

.contact-status {
  min-height: 1.6em;
  margin: 0.5em 0 0;
}
