/* ==========================================================================
   site.css — loaded last, after main.css.
   Holds two things: accessibility corrections to existing rules, and the
   styles for components added for navigation and SEO (breadcrumbs, related
   posts, post cards, contact page, footer nav).
   ========================================================================== */

/* --------------------------------------------------------------------------
   Link contrast.
   main.css sets `a { color: #760824 }` against a #000 body. That measures
   1.83:1, far under the WCAG AA 4.5:1 minimum for body text — on a phone in
   daylight those links are effectively invisible. #d94f70 keeps the same red
   hue family the theme is built around and measures 5.30:1.
   Scoped away from the hero/nav areas, which paint their own colours over
   background images and already pass on their own.
   -------------------------------------------------------------------------- */
a {
  color: #d94f70;
}
a:hover,
a:focus {
  color: #fff;
}

/* Keyboard focus. main.css sets `outline: none` on :focus for links, which
   removes the only visible affordance for keyboard users. Restore a visible
   ring, but only for keyboard focus so mouse clicks stay clean. */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid #d94f70;
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Post and page body column.
   post.html previously dropped `{{ content }}` straight into a .row. Bootstrap
   rows carry negative side margins intended to be cancelled by a column, so
   text ran past the viewport edge on narrow screens. .post-body is that
   missing column: a centred, measured reading width.
   -------------------------------------------------------------------------- */
.post-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 15px;
}
.post-body p {
  line-height: 1.65;
  font-size: 0.95em;
}
.post-body h2 {
  font-size: 1.9em;
  margin: 0 0 1em;
  line-height: 1.25;
}
.post-body h3 {
  font-size: 1.3em;
  margin: 2.2em 0 0.6em;
  line-height: 1.3;
  color: #acd578;
}
.post-body ul,
.post-body ol {
  line-height: 1.65;
  font-size: 0.95em;
  padding-left: 1.4em;
  margin: 1.5em 0;
}
.post-body li {
  margin-bottom: 0.6em;
}
.post-body img {
  max-width: 100%;
  height: auto;
}
.post-body blockquote {
  border-left: 3px solid #d94f70;
  padding-left: 1.2em;
  margin-left: 0;
}
.post-body table {
  width: 100%;
  margin: 1.8em 0;
  font-size: 0.85em;
  border-collapse: collapse;
}
.post-body th,
.post-body td {
  border: 1px solid #404040;
  padding: 0.55em 0.7em;
  text-align: left;
}
.post-body th {
  background: #1a1a1a;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Breadcrumbs.
   Gives readers a visible route back up, and gives Google an explicit
   hierarchy to render in results (paired with BreadcrumbList JSON-LD).
   -------------------------------------------------------------------------- */
.breadcrumbs {
  max-width: 760px;
  margin: 2em auto 0;
  padding: 0 15px;
  font-size: 0.7em;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9a9a9a;
}
.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.breadcrumbs li {
  display: inline;
}
.breadcrumbs li + li::before {
  content: "/";
  margin: 0 0.55em;
  color: #555;
}
.breadcrumbs a {
  text-decoration: none;
}
.breadcrumbs [aria-current="page"] {
  color: #eee;
}

/* --------------------------------------------------------------------------
   Post cards — the journal index listing.
   Replaces the inline-styled markup that produced an unreadable wall of
   identical rows.
   -------------------------------------------------------------------------- */
.post-cards {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 900px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 26px;
}
.post-card {
  background: #121212;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .25s, transform .25s;
}
.post-card:hover,
.post-card:focus-within {
  border-color: #d94f70;
  transform: translateY(-3px);
}
.post-card__thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1a1a1a;
}
.post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.post-card__body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.post-card__title {
  font-size: 1.02rem;
  line-height: 1.35;
  margin: 0 0 0.45em;
  font-weight: 700;
}
.post-card__title a {
  text-decoration: none;
  color: #eee;
}
.post-card__title a:hover,
.post-card__title a:focus {
  color: #d94f70;
}
.post-card__desc {
  font-size: 0.8rem;
  line-height: 1.5;
  color: #b4b4b4;
  margin: 0 0 1em;
  flex: 1;
}
.post-card__meta {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8d8d8d;
  margin: 0;
}
.post-card__meta a {
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Related posts — internal linking at the end of every article, so no post
   is a dead end for a reader or a crawler.
   -------------------------------------------------------------------------- */
.related {
  max-width: 760px;
  margin: 3.5em auto 0;
  padding: 0 15px;
}
.related h3 {
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9a9a9a;
  margin-bottom: 1em;
}
.related ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.related li {
  border-top: 1px solid #2a2a2a;
  padding: 0.85em 0;
}
.related li:last-child {
  border-bottom: 1px solid #2a2a2a;
}
.related a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}
.related .related__meta {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8d8d8d;
  margin-top: 0.25em;
}

/* --------------------------------------------------------------------------
   Section index — used by the journal landing page to present categories as
   real entry points rather than a bare tag soup.
   -------------------------------------------------------------------------- */
.section-index {
  max-width: 900px;
  margin: 0 auto 3em;
  padding: 0 15px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  list-style: none;
}
.section-index li {
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  background: #121212;
}
.section-index a {
  display: block;
  padding: 14px 16px;
  text-decoration: none;
}
.section-index a:hover,
.section-index a:focus {
  border-color: #d94f70;
}
.section-index__name {
  display: block;
  font-weight: 700;
  color: #eee;
  font-size: 0.95rem;
}
.section-index a:hover .section-index__name {
  color: #d94f70;
}
.section-index__count {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8d8d8d;
  margin-top: 0.3em;
}

/* --------------------------------------------------------------------------
   Footer navigation. AdSense reviewers look for About / Contact / Privacy
   being reachable from every page; keeping them in the footer also lets the
   main nav stay focused on content sections.
   -------------------------------------------------------------------------- */
.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2em;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.footer-nav li {
  display: inline-block;
  margin: 0 0.55em 0.5em;
}
.footer-nav a {
  text-decoration: none;
  color: #b4b4b4;
}
.footer-nav a:hover,
.footer-nav a:focus {
  color: #fff;
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

/* Skip link: first tab stop on the page, visually hidden until focused. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 10px 16px;
  background: #530720;
  color: #fff;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
}

/* Reserve space for lazily-loaded gallery images so their arrival does not
   shove the layout downward (cumulative layout shift). */
.gallery-item img {
  max-width: 100%;
  height: auto;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   Search page. Previously styled inline, and pointed at a script that did not
   exist in the repo, so the page was inert.
   -------------------------------------------------------------------------- */
.search-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9a9a9a;
  margin-bottom: 0.5em;
}
.search-input {
  width: 100%;
  padding: 0.65em 0.8em;
  font-size: 0.9rem;
  color: #eee;
  background-color: #12161d;
  border: 1px solid #2b3742;
  border-radius: 6px;
}
.search-input:focus {
  border-color: #d94f70;
  box-shadow: 0 0 0 3px rgba(217, 79, 112, 0.25);
  outline: none;
}
.search-status {
  font-size: 0.75rem;
  color: #9a9a9a;
  margin: 0.9em 0 0;
  min-height: 1.2em;
}
.search-results {
  list-style: none;
  padding: 0;
  margin: 1.2em 0 0;
}
.search-result {
  border-top: 1px solid #2a2a2a;
  padding: 1em 0;
}
.search-result:last-child {
  border-bottom: 1px solid #2a2a2a;
}
.search-result > a {
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}
.search-result__meta {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8d8d8d;
  margin-top: 0.25em;
}
.search-result__excerpt {
  font-size: 0.8rem;
  line-height: 1.55;
  color: #b4b4b4;
  margin: 0.5em 0 0;
}
.search-result mark {
  background: rgba(217, 79, 112, 0.28);
  color: #fff;
  padding: 0 0.15em;
}
.tag-cloud a {
  display: inline-block;
  margin: 0 0.9em 0.6em 0;
  font-size: 0.82rem;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Home page. body.fullscreen hides overflow, so everything here has to fit the
   viewport — the shared footer is never reachable, which is why the home page
   carries its own compact link row.
   -------------------------------------------------------------------------- */
.site-title-visually-plain {
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  margin: 0 0 0.2em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
}
.site-tagline {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #dddddd;
  margin: 0 0 0.9em;
  max-width: 46ch;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}
.home-links {
  margin-bottom: 0.9em;
}
.home-links a {
  display: inline-block;
  margin: 0 1.1em 0.4em 0;
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}
.home-links a:hover,
.home-links a:focus {
  color: #f4a6b8;
}
.home-latest {
  margin-bottom: 0.8em;
}
.home-latest__label {
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #dddddd;
  margin: 0 0 0.35em;
}
.home-latest ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.home-latest li {
  margin-bottom: 0.22em;
  font-size: 0.8rem;
  line-height: 1.35;
}
.home-latest a {
  color: #eee;
  text-decoration: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}
.home-latest a:hover,
.home-latest a:focus {
  color: #f4a6b8;
}
.home-latest__date {
  font-size: 0.68rem;
  color: #b0b0b0;
  margin-left: 0.5em;
}
.home-latest__more {
  margin: 0.5em 0 0;
  font-size: 0.78rem;
}
.home-latest__more a {
  color: #fff;
  text-decoration: none;
}
.home-soc {
  margin: 0 0 0.5em;
  padding: 0;
  list-style: none;
}
.home-soc li {
  display: inline-block;
  margin-right: 0.9em;
}
.home-soc a {
  color: #dddddd;
  font-size: 1.05rem;
}
.home-soc a:hover,
.home-soc a:focus {
  color: #fff;
}
.home-footer-nav {
  text-align: left;
  margin-bottom: 0.6em;
  font-size: 0.66rem;
}
.home-footer-nav li {
  margin: 0 0.7em 0.3em 0;
}

/* On short viewports the latest-posts list is the first thing that can go: the
   section links and the legal row matter more than four headlines. */
@media (max-height: 620px) {
  .home-latest ul,
  .home-latest__label {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Follow strip. Replaces the dead TinyLetter signup form that sat in this slot
   on every page.
   -------------------------------------------------------------------------- */
.follow-strip {
  background-color: #530720;
  padding: 26px 0 30px;
  margin: 50px 0 60px;
}
.follow-strip__title {
  font-size: 0.74rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin: 0 0 0.5em;
  color: #fff;
}
.follow-strip__body {
  font-size: 0.84rem;
  line-height: 1.6;
  margin: 0;
  color: #f0dde3;
}
.follow-strip__body a {
  color: #fff;
  text-decoration: underline;
}
.follow-strip__body a:hover,
.follow-strip__body a:focus {
  color: #ffd9e2;
}

/* --------------------------------------------------------------------------
   Games index. Card styling only; the page now uses the shared page layout so
   it carries the site nav, breadcrumb and footer like every other page.
   -------------------------------------------------------------------------- */
.game-grid {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 15px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 460px));
  gap: 22px;
  justify-content: center;
}
.game-card {
  background: #19222b;
  border: 1px solid #2b3742;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.game-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  display: block;
  background: #000;
}
.game-card__body {
  padding: 18px 20px 22px;
}
.game-card__body h2 {
  font-size: 1.3rem;
  margin: 0 0 0.5em;
}
.game-card__body p {
  color: #9db0c0;
  font-size: 0.85rem;
  line-height: 1.55;
  margin: 0 0 0.8em;
}
.game-card__meta {
  color: #7e8f9d !important;
  font-size: 0.78rem !important;
}
.game-card__play {
  display: inline-block;
  margin-top: 8px;
  padding: 11px 26px;
  border-radius: 99px;
  background: #f0b24a;
  color: #2b1d02;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
}
.game-card__play:hover {
  filter: brightness(1.08);
  color: #2b1d02;
}
.game-card__play:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Responsive video embed. The about page previously carried a fixed
   width="1184" height="666" iframe, which overflowed every phone viewport.
   -------------------------------------------------------------------------- */
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 1.5em 0 2em;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --------------------------------------------------------------------------
   Archive index — the complete date-ordered post list.
   -------------------------------------------------------------------------- */
.archive-year {
  margin: 2.2em 0 0.2em;
  padding-bottom: 0.25em;
  border-bottom: 1px solid #2a2a2a;
  font-size: 1.4rem;
  color: #eee;
}
.archive-month {
  margin: 1.4em 0 0.4em;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #9a9a9a;
}
.archive-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.archive-list li {
  padding: 0.5em 0;
  border-bottom: 1px solid #1e1e1e;
  font-size: 0.9rem;
  line-height: 1.4;
}
.archive-list a {
  text-decoration: none;
  font-weight: 600;
}
.archive-meta {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8d8d8d;
  margin-top: 0.2em;
}

/* --------------------------------------------------------------------------
   Taxonomy index groups — the per-category and per-tag sections on the
   category and tag index pages.
   -------------------------------------------------------------------------- */
.taxonomy-group {
  margin: 2.4em 0 0;
}
.taxonomy-group h2 {
  font-size: 1.15rem;
  margin: 0 0 0.5em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid #2a2a2a;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6em;
}
.taxonomy-group h2 a {
  text-decoration: none;
}
.taxonomy-group__count {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: #8d8d8d;
  border: 1px solid #2a2a2a;
  border-radius: 99px;
  padding: 0.15em 0.6em;
  flex: none;
}

/* Post byline. The info line was inline-styled with a font stack already inherited
   from body; only the size and colour were doing any work. */
.post-author {
  margin-top: 2.5em;
}
.post-author__info {
  display: inline-block;
  font-size: 0.75em;
  color: #9a9a9a;
}

/* --------------------------------------------------------------------------
   AdSense placements.

   Bootstrap 3 is what this site ships, so there is no `my-4` spacing utility to
   lean on — the vertical rhythm is declared here instead.

   Two things this has to get right, both of them AdSense policy rather than
   taste:

   1. An ad must not be mistaken for content or for navigation. The rule above
      each unit and the "Advertisement" label give it a visible boundary, which
      is what "clearly distinguishable" means in practice.
   2. The reserved height stops the page reflowing when a unit fills. Without it
      the paragraph under an in-article ad jumps down as the creative loads,
      which is both a Core Web Vitals (CLS) penalty and the mechanism behind
      accidental clicks — the thing invalid-traffic detection acts on.

   `min-height` rather than a fixed height: a fluid in-article creative decides
   its own size, and pinning it would crop the ad.
   -------------------------------------------------------------------------- */
.post-ad {
  max-width: 760px;
  margin: 2.6em auto;
  padding: 0 15px;
  min-height: 100px;
  overflow: hidden;
}
.post-ad::before {
  content: "Advertisement";
  display: block;
  border-top: 1px solid #2a2a2a;
  padding-top: 0.7em;
  margin-bottom: 0.7em;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #7a7a7a;
}
.post-ad .adsbygoogle {
  width: 100%;
}
.post-ad-bottom {
  margin-bottom: 1.2em;
}
