:root {
  /* antique-tarot-64.hex — keep in sync when the palette file changes */
  --tarot-night-deep: #0f1326;
  --tarot-night-blue: #1b2340;
  --tarot-night-mid: #2a3760;
  --tarot-dusk-brown: #442125;
  --tarot-dusk-umber: #5f3c31;
  --tarot-gold-shadow: #6a432a;
  --tarot-gold-dark: #8e5e33;
  --tarot-gold-mid: #b9793f;
  --tarot-gold-bright: #cf8c52;
  --tarot-gold-wheat: #d49d55;
  --tarot-gold-pale: #e2bb72;
  --tarot-gold-cream: #e8c988;
  --tarot-cream-soft: #f2d8c3;
  --tarot-cream: #f8e6d0;
  --tarot-paper: #f2f0e6;
  --tarot-gold-accent: #d4af37;
  --tarot-earth-night: #2a0f18;
  --tarot-purple-night: #200816;
  --tarot-muted-rose: #b88362;
  --tarot-text-default: var(--tarot-paper);
  --tarot-tagline-red: #a62020;
  /* Section / card titles (e.g. “1877: The American Indian Wars”) */
  --color-title: var(--tarot-gold-cream);
  --color-hover-text: var(--tarot-tagline-red);

  /* Page chrome (header / copy / footer) — hero .hero__dusk stays its own gradient */
  --color-bg: var(--tarot-night-deep);
  --color-bg-elevated: var(--tarot-night-deep);
  --color-text: var(--tarot-text-default);
  --color-text-muted: var(--tarot-text-default);
  --color-accent: var(--tarot-gold-accent);
  --color-accent-soft: var(--tarot-gold-mid);
  --color-sky-top: var(--tarot-night-mid);
  --color-sky-bottom: var(--tarot-gold-shadow);
  --color-ridge: var(--tarot-dusk-brown);
  --color-mesa: var(--tarot-earth-night);
  /* Google Fonts: 8-bit title + readable pixel body */
  --font-pixel-title: "Press Start 2P", system-ui, sans-serif;
  --font-pixel-body: "VT323", "Courier New", Courier, monospace;
  --font-sans: var(--font-pixel-body);
  --font-mono: var(--font-pixel-body);
  --space-xs: 0.35rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --content-max: 800px;
  --header-max: 70rem;
  --radius: 4px;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-pixel-body);
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--color-text);
  background: var(--color-bg);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-accent);
  color: var(--color-bg);
  font-weight: 600;
  z-index: 100;
  border-radius: var(--radius);
}

.skip-link:focus {
  left: 0.5rem;
}

.site-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: #a62020;
}

.site-header__inner {
  max-width: var(--header-max);
  margin: 0 auto;
  padding: var(--space-md) var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-lg);
}

.site-logo {
  display: block;
  line-height: 0;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo picture {
  display: block;
  line-height: 0;
}

.site-logo:focus-visible {
  outline: 2px solid var(--color-hover-text);
  outline-offset: 4px;
  border-radius: 2px;
}

.site-logo__img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.site-nav a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--color-hover-text);
}

.site-nav a:focus-visible {
  outline: 2px solid var(--color-hover-text);
  outline-offset: 4px;
  border-radius: 4px;
}

.site-nav__socials {
  margin: 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.site-nav__actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.social-icon {
  width: 3.35rem;
  height: 3.35rem;
  border: none;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tarot-cream);
  background: transparent;
}

.social-icon:hover {
  color: var(--color-hover-text);
}

.social-icon:focus-visible {
  outline: 2px solid var(--color-hover-text);
  outline-offset: 3px;
}

.social-icon svg {
  width: 1.8rem;
  height: 1.8rem;
  fill: currentColor;
  display: block;
  stroke: currentColor;
  stroke-width: 0.85;
  paint-order: stroke fill;
}

.social-icon--mail svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.95;
  stroke-linecap: round;
  stroke-linejoin: round;
  paint-order: normal;
}

.social-icon--mail svg rect,
.social-icon--mail svg path {
  fill: none;
}

.nav-text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 28px;
  padding: 0 10px;
  border-radius: 0;
  border: none;
  color: var(--color-text);
  background: transparent;
  font-family: var(--font-pixel-title);
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.nav-text-button:hover {
  color: var(--color-hover-text);
}

.site-header .social-icon:hover {
  color: #0f1326;
}

.site-header .nav-text-button:hover {
  color: #0f1326;
}

.site-nav a.nav-text-button:focus-visible {
  outline: none;
}

.hero {
  position: relative;
}

.hero__scene {
  position: relative;
  min-height: clamp(22rem, 62vh, 36rem);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.hero__scene--cav {
  --cav-tile-x: 480px;
  --cav-tile-y: 270px;
  --cav-scroll-base: 96s;
  --cav-rider-frames: 7;

  --cav-rider-loop: 1.0s;
}

.hero__dusk {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;

  background: linear-gradient(
    180deg,
    var(--tarot-gold-dark) 0%,
    var(--tarot-gold-mid) 11%,
    var(--tarot-gold-bright) 22%,
    var(--tarot-gold-wheat) 33%,
    var(--tarot-gold-pale) 44%,
    var(--tarot-gold-cream) 53%,
    var(--tarot-cream-soft) 62%,
    var(--tarot-cream) 70%,
    var(--tarot-gold-accent) 77%,
    var(--tarot-gold-cream) 83%,
    var(--tarot-cream) 89%,
    var(--tarot-paper) 100%
  );
}

.hero__cav-fill {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;

  opacity: 0.14;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
}

.hero__parallax {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background-repeat: repeat-x;
  background-position: 0 bottom;
  background-size: var(--cav-tile-x) var(--cav-tile-y);
  will-change: background-position;
  animation: cav-parallax-x linear infinite;
}

.hero__parallax--cloud02 {
  z-index: 10;
  animation-duration: calc(var(--cav-scroll-base) / 2);
  transform: translateY(-20px);
}

.hero__parallax--cloud01 {
  z-index: 11;
  animation-duration: calc(var(--cav-scroll-base) / 4);
  transform: translateY(-40px);
}

.hero__parallax--mt {
  z-index: 12;
  animation-duration: calc(var(--cav-scroll-base) / 1);
}

.hero__parallax--ground {
  z-index: 13;
  animation-duration: calc(var(--cav-scroll-base) / 3);
}

.hero__parallax--fg {
  z-index: 16;
  animation-duration: calc(var(--cav-scroll-base) / 6);
}

.hero__riders {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 15;
  transform: translateX(-50%);

  --cav-tile-x: 480px;
  --cav-tile-y: 270px;
  --cav-rider-frames: 7;
  --cav-rider-loop: inherit;

  width: var(--cav-tile-x);
  height: var(--cav-tile-y);
  background-repeat: no-repeat;
  background-position: 0 center;
  background-size: calc(var(--cav-rider-frames) * var(--cav-tile-x))
    var(--cav-tile-y);
  pointer-events: none;
  animation-name: cav-rider-run;
  animation-duration: var(--cav-rider-loop);
  animation-timing-function: steps(7);
  animation-iteration-count: infinite;
  will-change: background-position;
}

.hero__grain--cav {
  position: absolute;
  inset: 0;
  z-index: 17;
  opacity: 0.06;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  animation: hero-grain 0.1s steps(2) infinite;
}

.hero__content {
  position: relative;
  z-index: 25;
  text-align: center;
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
  max-width: 36rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__scene--cav .hero__content {
  padding-bottom: clamp(9rem, 34vh, 17rem);
}

.hero__heading {
  margin: 0;
  line-height: 0;
  font-size: 0;
}


.hero__logo {
  display: block;
  max-width: 100%;
  height: auto;
}

.hero__tagline {
  margin: var(--space-md) 0 0;
  max-width: 28rem;
  font-family: var(--font-pixel-title);
  font-size: clamp(0.45rem, 2.2vw, 0.62rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.06em;
  color: var(--tarot-tagline-red);
  text-align: center;
}

.pitch {
  padding: var(--space-xl) var(--space-lg);
  background: var(--tarot-night-deep);
}

.pitch__inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.pitch h2 {
  margin: 0 0 var(--space-md);
  font-family: var(--font-pixel-title);
  font-size: clamp(0.5rem, 2.8vw, 0.72rem);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-title);
}

.pitch p {
  margin: 0 0 var(--space-md);
  color: var(--color-text-muted);
}

.pitch p:last-of-type {
  margin-bottom: var(--space-lg);
}

.pitch strong {
  color: var(--color-text);
  font-weight: 600;
}

.pitch__wrap {
  overflow: hidden;
}

.pitch__wrap + .pitch__wrap {
  margin-top: var(--space-lg);
}

.pitch__wrap p {
  margin-bottom: 0;
}

.pitch__inner > .pitch__wrap:last-child p {
  margin-bottom: var(--space-lg);
}

.pitch__figure {
  float: left;
  width: 480px;
  max-width: 100%;
  margin: 0 var(--space-md) var(--space-sm) 0;
}

.pitch__figure--right {
  float: right;
  margin: 0 0 var(--space-sm) var(--space-md);
}

.pitch__figure img {
  display: block;
  width: 480px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 480 / 270;
}

.pitch__figure--intrinsic img {
  aspect-ratio: auto;
}

@media (max-width: 640px) {
  .pitch__figure {
    float: left;
    width: 240px;
    max-width: 100%;
    margin: 0 var(--space-sm) var(--space-xs) 0;
  }

  .pitch__figure--right {
    float: right;
    margin: 0 0 var(--space-xs) var(--space-sm);
  }

  .pitch__figure img {
    width: 100%;
    max-width: 100%;
  }
}

.pitch__facts {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--color-text-muted);
}

.pitch__facts li {
  margin-bottom: var(--space-xs);
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: var(--space-xl) var(--space-lg);
  background: var(--color-bg-elevated);
}

.site-footer__inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.site-footer__note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-align: center;
}

.site-footer__note code {
  font-size: 0.85em;
  color: var(--color-text);
}

.blog-main {
  padding: var(--space-xl) var(--space-lg);
  background: var(--tarot-night-deep);
}

.blog-section {
  max-width: 48rem;
  margin: 0 auto;
}

.blog-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-pixel-title);
  font-size: clamp(0.65rem, 3.5vw, 0.85rem);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: var(--color-title);
}

.blog-subtitle {
  margin: 0 0 var(--space-lg);
  color: var(--color-text-muted);
}

.blog-list {
  display: grid;
  gap: var(--space-lg);
}

.post-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius);
  padding: var(--space-md);
}

.post-card h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-pixel-title);
  font-size: clamp(0.48rem, 2.5vw, 0.65rem);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.03em;
  color: var(--color-title);
}

.post-meta {
  margin: 0 0 var(--space-sm);
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.post-card p {
  margin: 0 0 var(--space-sm);
  color: var(--color-text-muted);
}

.post-image {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.pitch__inner .about-socials {
  margin-top: var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.pitch__inner .about-socials .social-icon {
  width: 4.35rem;
  height: 4.35rem;
}

.pitch__inner .about-socials .social-icon svg {
  width: 2.35rem;
  height: 2.35rem;
}

/* Narrow: logo left, social row above Game/About/Updates, right-aligned block */
@media (max-width: 760px) {
  .pitch__inner .about-socials .social-icon {
    width: 3.75rem;
    height: 3.75rem;
  }

  .pitch__inner .about-socials .social-icon svg {
    width: 2.05rem;
    height: 2.05rem;
  }

  .site-header__inner {
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
  }

  .site-nav {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 0;
    flex-direction: column;
    align-items: flex-end;
    align-self: center;
    gap: 0.3rem;
    flex-wrap: nowrap;
  }

  .site-nav__socials {
    margin: 0;
    width: auto;
    justify-content: flex-end;
    gap: 0.4rem;
  }

  .site-nav__actions {
    margin-left: 0;
    width: auto;
    max-width: 100%;
    justify-content: flex-end;
    gap: 0.28rem;
    flex-wrap: wrap;
    row-gap: 0.15rem;
  }

  .social-icon {
    width: 2.55rem;
    height: 2.55rem;
  }

  .social-icon svg {
    width: 1.38rem;
    height: 1.38rem;
  }

  .site-nav a.nav-text-button {
    font-size: 10px;
    height: 20px;
    padding: 0 4px;
    letter-spacing: 0;
  }
}

/* Wide: logo | centered socials | nav buttons — grid + contents so socials hit true center */
@media (min-width: 761px) {
  .site-header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--space-sm) var(--space-lg);
  }

  .site-nav {
    display: contents;
  }

  .site-logo {
    grid-column: 1;
    justify-self: start;
  }

  .site-nav__socials {
    grid-column: 2;
    justify-self: center;
    margin: 0;
    width: auto;
    justify-content: center;
    gap: 0.65rem;
  }

  .site-nav__actions {
    grid-column: 3;
    justify-self: end;
    margin-left: 0;
    width: auto;
    justify-content: flex-end;
    gap: 0.55rem;
    flex-wrap: wrap;
  }

  .social-icon {
    width: 3.35rem;
    height: 3.35rem;
  }

  .social-icon svg {
    width: 1.8rem;
    height: 1.8rem;
  }

  .site-nav a.nav-text-button {
    font-size: 16px;
    height: 28px;
    padding: 0 10px;
    letter-spacing: 0.03em;
  }
}

@keyframes cav-parallax-x {
  from {
    background-position: 0 bottom;
  }
  to {
    /* Must match --cav-tile-x (export width) for seamless tiling */
    background-position: -480px bottom;
  }
}

@keyframes cav-rider-run {
  from {
    background-position-x: 0;
  }
  to {
    background-position-x: calc(
      -1 * var(--cav-rider-frames) * var(--cav-tile-x)
    );
  }
}

@keyframes hero-grain {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-4%, 3%, 0);
  }
}

html.motion-reduced .hero__parallax,
html.motion-reduced .hero__riders,
html.motion-reduced .hero__grain--cav {
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .hero__parallax,
  .hero__riders,
  .hero__grain--cav {
    animation: none !important;
  }
}

.pixel-art {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
