* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #06233a;
  overflow-x: hidden;
}

body {
  font-family: Georgia, "Times New Roman", serif;
}

.western-page {
  width: 100%;
  min-height: 100vh;
}

.western-hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  background-image: url("/assets/images/western_homepage_clean.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.stagecoach-layer {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  overflow: hidden;
}

.stagecoach-sprite {
  position: absolute;
  left: 9%;
  bottom: 16.5%;
  width: 11vw;
  min-width: 95px;
  max-width: 235px;
  height: auto;
  opacity: 0;
  transform-origin: center bottom;
  filter: drop-shadow(0 12px 12px rgba(35, 18, 5, 0.28));
  animation: stagecoachPreviewRide 4.8s linear infinite;
}

@keyframes stagecoachPreviewRide {
  0% {
    opacity: 0;
    left: 6.8%;
    bottom: 17.2%;
    width: 8.5vw;
    transform: rotate(-1deg);
  }

  10% {
    opacity: 1;
  }

  45% {
    opacity: 1;
    left: 13.5%;
    bottom: 16.6%;
    width: 11vw;
    transform: rotate(-0.4deg);
  }

  80% {
    opacity: 1;
    left: 19%;
    bottom: 15.8%;
    width: 13.2vw;
    transform: rotate(0deg);
  }

  100% {
    opacity: 0;
    left: 22%;
    bottom: 15.4%;
    width: 14vw;
    transform: rotate(0.2deg);
  }
}

.stagecoach-note {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 20;
  padding: 10px 12px;
  border: 1px solid rgba(255, 241, 207, 0.55);
  background: rgba(5, 17, 28, 0.62);
  color: #fff4d6;
  font: 600 13px/1.35 Arial, sans-serif;
  border-radius: 8px;
  backdrop-filter: blur(8px);
}

@media (max-width: 700px) {
  .western-hero {
    min-height: 100svh;
    background-position: center center;
  }

  .stagecoach-sprite {
    left: 4%;
    bottom: 18%;
    width: 19vw;
    min-width: 80px;
  }

  .stagecoach-note {
    display: none;
  }
}

/* =========================================================
   PKW WESTERN STAGECOACH FINAL RUNNER START
   Big-road alignment tune: larger coach, higher path.
   Uses stagecoach-frame-1.png through stagecoach-frame-8.png.
   ========================================================= */

.western-hero[data-stagecoach-scene],
.stagecoach-scene-root {
  position: relative !important;
  overflow: hidden !important;
  isolation: isolate;
}

/* Force old preview parts off if any cached HTML remains. */
.stagecoach-note,
.stagecoach-sprite,
.western-hero > .stagecoach-layer {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

.stagecoach-scene-root > *:not(.stagecoach-run-layer) {
  position: relative;
  z-index: 2;
}

.stagecoach-run-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.stagecoach-run-motion {
  /*
    Main size control.
    These generated PNGs have transparent canvas around the coach,
    so the holder must be much bigger than the visible coach.
  */
  --stagecoach-width: clamp(520px, 78vw, 1500px);

  position: absolute;
  width: var(--stagecoach-width);
  aspect-ratio: 1 / 1;
  left: 25%;
  top: 61%;
  opacity: 0;
  transform-origin: 50% 82%;
  transform: translate(-50%, -50%) scale(0.40);
  animation: pkwStagecoachRoadRun 10.8s linear infinite;
  will-change: left, top, transform, opacity;
}

.stagecoach-run-frame {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 22px 24px rgba(60, 30, 10, 0.28));
}

@keyframes pkwStagecoachRoadRun {
  0% {
    opacity: 0;
    left: 23%;
    top: 60%;
    transform: translate(-50%, -50%) scale(0.38);
  }

  7% {
    opacity: 1;
  }

  18% {
    opacity: 1;
    left: 27%;
    top: 62%;
    transform: translate(-50%, -50%) scale(0.48);
  }

  32% {
    left: 32%;
    top: 65%;
    transform: translate(-50%, -50%) scale(0.62);
  }

  48% {
    left: 38%;
    top: 69%;
    transform: translate(-50%, -50%) scale(0.82);
  }

  64% {
    left: 45%;
    top: 75%;
    transform: translate(-50%, -50%) scale(1.06);
  }

  80% {
    opacity: 1;
    left: 52%;
    top: 84%;
    transform: translate(-50%, -50%) scale(1.32);
  }

  93% {
    opacity: 0.92;
    left: 57%;
    top: 96%;
    transform: translate(-50%, -50%) scale(1.56);
  }

  100% {
    opacity: 0;
    left: 61%;
    top: 110%;
    transform: translate(-50%, -50%) scale(1.76);
  }
}

@media (max-width: 900px) {
  .stagecoach-run-motion {
    --stagecoach-width: clamp(400px, 92vw, 980px);
  }
}

@media (max-width: 640px) {
  .stagecoach-run-motion {
    --stagecoach-width: clamp(330px, 108vw, 780px);
  }

  @keyframes pkwStagecoachRoadRun {
    0% {
      opacity: 0;
      left: 20%;
      top: 62%;
      transform: translate(-50%, -50%) scale(0.34);
    }

    8% {
      opacity: 1;
    }

    35% {
      left: 34%;
      top: 70%;
      transform: translate(-50%, -50%) scale(0.58);
    }

    60% {
      left: 48%;
      top: 82%;
      transform: translate(-50%, -50%) scale(0.92);
    }

    84% {
      opacity: 1;
      left: 56%;
      top: 96%;
      transform: translate(-50%, -50%) scale(1.22);
    }

    100% {
      opacity: 0;
      left: 62%;
      top: 114%;
      transform: translate(-50%, -50%) scale(1.48);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .stagecoach-run-motion {
    animation: none;
    opacity: 0;
  }
}

/* =========================================================
   PKW WESTERN STAGECOACH FINAL RUNNER END
   ========================================================= */

/* =========================================================
   PKW WESTERN HERO CLICKABLE BUTTONS START
   Real clickable overlay buttons matching the painted artwork.
   ========================================================= */

.western-hero-cta-overlay {
  position: absolute;
  left: 12.6%;
  top: 60.7%;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: clamp(22px, 3.2vw, 46px);
  pointer-events: auto;
}

.western-hero-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: clamp(48px, 4vw, 62px);
  padding: 0 clamp(25px, 2.7vw, 40px);
  border-radius: 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(14px, 1.05vw, 18px);
  font-weight: 900;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  cursor: pointer;
  transform: translateY(0);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease,
    background 180ms ease;
  will-change: transform;
}

.western-hero-btn-primary {
  color: #fff4cf;
  background:
    linear-gradient(180deg, rgba(8, 43, 83, 0.98), rgba(4, 25, 57, 0.98));
  border: 2px solid rgba(10, 33, 70, 0.9);
  box-shadow:
    0 5px 0 rgba(3, 18, 42, 0.9),
    0 12px 18px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

.western-hero-btn-primary strong {
  color: #f5a624;
  font-size: 1.1em;
  line-height: 1;
  transform: translateY(-1px);
}

.western-hero-btn-secondary {
  color: #09213d;
  background:
    linear-gradient(180deg, rgba(fff, 255, 245, 0.98), rgba(244, 226, 194, 0.98));
  background:
    linear-gradient(180deg, rgba(255, 251, 240, 0.98), rgba(245, 226, 193, 0.98));
  border: 2px solid rgba(176, 128, 72, 0.78);
  box-shadow:
    0 5px 0 rgba(157, 102, 46, 0.58),
    0 12px 18px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.western-hero-btn-secondary strong {
  font-size: 1.9em;
  line-height: 0.7;
  transform: translateY(-1px);
}

.western-hero-btn:hover {
  transform: translateY(-4px);
  filter: saturate(1.07) contrast(1.03);
}

.western-hero-btn:active {
  transform: translateY(1px);
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.34),
    0 8px 14px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.western-hero-btn:focus-visible {
  outline: 4px solid rgba(255, 198, 75, 0.75);
  outline-offset: 4px;
}

@media (max-width: 900px) {
  .western-hero-cta-overlay {
    left: 8.5%;
    top: 60.5%;
    gap: 16px;
  }

  .western-hero-btn {
    min-height: 46px;
    padding: 0 20px;
    font-size: 13px;
  }
}

@media (max-width: 640px) {
  .western-hero-cta-overlay {
    left: 50%;
    top: 63%;
    width: min(88vw, 390px);
    transform: translateX(-50%);
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .western-hero-btn {
    width: 100%;
    min-height: 46px;
    font-size: 13px;
  }
}

/* =========================================================
   PKW WESTERN HERO CLICKABLE BUTTONS END
   ========================================================= */

