:root {
  --bg: #1c120a;
  --bg-2: #261810;
  --brown: #3a2414;
  --wood: #8a6440;
  --wood-light: #a87a4a;
  --wood-dark: #5a3b22;
  --hay: #e8b54d;
  --hay-light: #f3d27e;
  --paper: #f0deb4;
  --ink: #3a2412;
  --sky: #5bb8e8;
  --red: #c8322b;
  --red-deep: #8f1f1a;
  --green: #2f8a4a;
  --blue: #2747b8;
  --cream: #fff4e0;
  --muted: #d5bd9a;
  --shade: transparent;
  --prop-dur: 0.7s;

  /* Wood grain and paper speckle textures */
  --grain-v: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.35 0.012' numOctaves='3' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.06 0 0 0 0 0.02 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --grain-h: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.35' numOctaves='3' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.06 0 0 0 0 0.02 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --speckle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='11'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.22 0 0 0 0 0.08 0 0 0 0.28 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--cream);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }

.wrap { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }

/* SHARED TEXTURES */
.barn-wall {
  background:
    linear-gradient(var(--shade), var(--shade)),
    var(--grain-v),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0 3px, transparent 3px 150px),
    repeating-linear-gradient(90deg, #5d3d24 0 150px, #694529 150px 300px, #533620 300px 450px);
}

.barn-dark {
  background:
    linear-gradient(var(--shade), var(--shade)),
    var(--grain-v),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0 3px, transparent 3px 150px),
    repeating-linear-gradient(90deg, #2d1c10 0 150px, #34200f 150px 300px, #291a0e 300px 450px);
}

.plank {
  background:
    var(--grain-h),
    linear-gradient(180deg, var(--wood-light), #7d5530);
  box-shadow:
    inset 0 2px 0 rgba(255, 235, 200, 0.18),
    inset 0 -3px 0 rgba(0, 0, 0, 0.28),
    0 6px 12px rgba(0, 0, 0, 0.45);
}

/* Nail heads at a plank's two top corners */
.nailed {
  position: relative;
}

.nailed::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 14px 50%, #d8cbb5 0 1.5px, #4a3a2a 2px 3.5px, transparent 4px),
    radial-gradient(circle at calc(100% - 14px) 50%, #d8cbb5 0 1.5px, #4a3a2a 2px 3.5px, transparent 4px);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: "Luckiest Guy", cursive;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  padding: 0.7rem 1.3rem 0.5rem;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn:active { transform: translateY(2px); }

.btn-buy {
  background: linear-gradient(180deg, #dc3d35, var(--red));
  color: #fff;
  box-shadow: 0 4px 0 var(--red-deep), 0 10px 22px rgba(200, 50, 43, 0.35);
}

.btn-buy:active { box-shadow: 0 1px 0 var(--red-deep); }

.btn-wood {
  color: var(--cream);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

.btn-wood svg { width: 0.95em; height: 0.95em; fill: currentColor; margin-top: -0.15em; }
.btn-lg { font-size: 1.35rem; padding: 0.95rem 1.9rem 0.75rem; }

/* HEADER: barn beam with hanging signboards */
.barn-top {
  position: relative;
  z-index: 20;
  background:
    var(--grain-h),
    linear-gradient(180deg, #24170d, #1c120a);
  border-bottom: 2px solid rgba(0, 0, 0, 0.5);
}

.beam {
  height: 20px;
  background:
    var(--grain-h),
    linear-gradient(180deg, #7d5732, #4e331c);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 1;
}

.top-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding-bottom: 0.9rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding-top: 0.9rem;
  font-family: "Luckiest Guy", cursive;
  letter-spacing: 0.04em;
  font-size: 1.45rem;
  white-space: nowrap;
}

.brand small {
  display: block;
  font-size: 0.62em;
  color: var(--hay);
  margin-top: -0.15rem;
}

.brand-badge {
  position: relative;
  width: 48px;
  height: 48px;
  flex: none;
}

.brand-badge img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid var(--hay);
  object-fit: cover;
  object-position: 50% 35%;
}

/* Spinning beanie propeller on top of the logo */
.prop {
  position: absolute;
  left: 50%;
  top: -13px;
  width: 40px;
  margin-left: -20px;
  perspective: 80px;
}

.prop::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  width: 3px;
  height: 8px;
  margin-left: -1.5px;
  background: #6b4a2e;
  border-radius: 2px;
}

.prop svg {
  display: block;
  width: 40px;
  height: 10px;
  animation: spin var(--prop-dur) linear infinite;
}

.signs {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  align-self: start;
}

.sign {
  position: relative;
  margin-top: 16px;
  padding: 0.55rem 0.95rem 0.45rem;
  border-radius: 6px;
  font-family: "Rye", serif;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  color: var(--cream);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
  white-space: nowrap;
  transform-origin: 50% -16px;
  animation: swing 3.6s ease-in-out infinite;
}

/* Ropes up to the beam */
.sign::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: -16px;
  height: 16px;
  border-left: 2px solid #c9a46e;
  border-right: 2px solid #c9a46e;
}

.sign:nth-child(2) { animation-duration: 4.1s; animation-delay: -1.2s; }
.sign:nth-child(3) { animation-duration: 3.3s; animation-delay: -0.6s; }
.sign:nth-child(4) { animation-duration: 4.4s; animation-delay: -2s; }
.sign:nth-child(5) { animation-duration: 3.8s; animation-delay: -1.6s; }

.sign:hover {
  color: var(--hay-light);
  animation: jiggle 0.6s ease-in-out infinite;
}

.top-actions {
  display: flex;
  gap: 0.6rem;
  padding-top: 0.9rem;
}

/* HERO */
.hero { position: relative; }

.scene {
  position: relative;
  height: clamp(340px, 64vh, 680px);
  overflow: hidden;
}

.scene > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  animation: settle 1.4s ease-out both;
}

.sunbeam {
  position: absolute;
  inset: -10% -20% 0 20%;
  background: linear-gradient(115deg,
    transparent 22%,
    rgba(255, 226, 150, 0.22) 36%,
    rgba(255, 226, 150, 0.08) 50%,
    transparent 58%);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: beam 7s ease-in-out infinite alternate;
}

.dust {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.mote {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 238, 196, 0.9);
  box-shadow: 0 0 6px rgba(255, 220, 150, 0.9);
  animation: mote var(--d, 12s) ease-in-out var(--delay, 0s) infinite alternate;
}

.scene-fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(28, 18, 10, 0.35) 0%, transparent 18%, transparent 52%, var(--bg) 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  margin-top: clamp(-7rem, -10vw, -3rem);
  padding-bottom: 3.5rem;
  text-align: center;
}

.welcome {
  display: inline-block;
  padding: 0.7rem 1.4rem 0.55rem;
  border-radius: 8px;
  font-family: "Rye", serif;
  font-size: clamp(1rem, 2.6vw, 1.35rem);
  letter-spacing: 0.06em;
  color: var(--cream);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
  transform-origin: 50% -30px;
  animation: swing 4.2s ease-in-out infinite;
}

.hero h1 {
  font-family: "Luckiest Guy", cursive;
  font-weight: 400;
  letter-spacing: 0.02em;
  font-size: clamp(3rem, 10.5vw, 8rem);
  line-height: 0.95;
  margin: 1rem 0 0.9rem;
  color: var(--hay-light);
  -webkit-text-stroke: 2px var(--brown);
  text-shadow:
    4px 4px 0 var(--red),
    8px 8px 0 rgba(0, 0, 0, 0.55);
  animation: rise 0.7s 0.2s ease-out both;
}

.hero-sub {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  font-weight: 800;
  color: var(--muted);
  max-width: 38rem;
  margin: 0 auto 1.8rem;
  animation: rise 0.7s 0.3s ease-out both;
}

.hero-sub strong { color: var(--cream); }

.ca {
  width: min(640px, 100%);
  margin: 0 auto 1.6rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.5rem 0.5rem 1.1rem;
  border-radius: 12px;
  animation: rise 0.7s 0.4s ease-out both;
}

.ca-label {
  font-family: "Rye", serif;
  color: var(--hay-light);
  font-size: 1.05rem;
  white-space: nowrap;
}

.ca code {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, "Cascadia Code", Menlo, monospace;
  font-size: clamp(0.9rem, 2.6vw, 1.1rem);
  font-weight: 700;
  text-align: left;
  color: var(--cream);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-copy {
  background: var(--hay);
  color: var(--ink);
  padding: 0.6rem 1.1rem 0.42rem;
  font-size: 1rem;
  min-width: 96px;
  box-shadow: 0 3px 0 #a87b26;
}

.btn-copy.copied { background: #5fc98f; box-shadow: 0 3px 0 #2f8a4a; }

.ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
  animation: rise 0.7s 0.5s ease-out both;
}

/* SECTION HEADINGS: nailed wooden signs */
section { padding: 4.5rem 0; position: relative; }

.section-head { text-align: center; margin-bottom: 2.6rem; }

.section-head h2 {
  display: inline-block;
  padding: 0.75rem 2.4rem 0.6rem;
  border-radius: 8px;
  font-family: "Rye", serif;
  font-weight: 400;
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  letter-spacing: 0.04em;
  color: var(--cream);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
  transform: rotate(-1.5deg);
}

.section-head p {
  margin-top: 1rem;
  font-family: "Permanent Marker", cursive;
  font-size: 1.15rem;
  color: var(--hay-light);
}

/* ABOUT: wanted poster on the barn wall */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: center;
}

.poster {
  position: relative;
  padding: 2rem 1.8rem 1.8rem;
  color: var(--ink);
  text-align: center;
  background:
    radial-gradient(circle at 85% 12%, rgba(120, 72, 24, 0.28), transparent 18%),
    radial-gradient(circle at 10% 88%, rgba(120, 72, 24, 0.22), transparent 22%),
    var(--speckle),
    var(--paper);
  box-shadow:
    inset 0 0 50px rgba(110, 66, 20, 0.5),
    12px 16px 0 rgba(0, 0, 0, 0.3),
    0 20px 40px rgba(0, 0, 0, 0.45);
  clip-path: polygon(0 1%, 8% 0, 22% 1.2%, 40% 0.2%, 58% 1%, 76% 0, 92% 0.8%, 100% 0, 99.2% 18%, 100% 38%, 99% 60%, 100% 82%, 99.4% 100%, 80% 99.2%, 62% 100%, 44% 99%, 24% 100%, 6% 99.3%, 0 100%, 0.8% 78%, 0 56%, 0.9% 34%, 0 14%);
  transform: rotate(-2deg);
}

.nail {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f0e6d4, #8b7a66 45%, #3a2e22 75%);
  box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.5);
}

.nail:nth-of-type(1) { top: 12px; left: 14px; }
.nail:nth-of-type(2) { top: 12px; right: 14px; }
.nail:nth-of-type(3) { bottom: 12px; left: 14px; }
.nail:nth-of-type(4) { bottom: 12px; right: 14px; }

.poster-wanted {
  font-family: "Rye", serif;
  font-size: clamp(3.2rem, 9vw, 4.6rem);
  line-height: 1;
  letter-spacing: 0.04em;
}

.poster-for {
  font-family: "Rye", serif;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  margin: 0.35rem 0 1rem;
  color: var(--red-deep);
}

.poster-photo {
  border: 4px solid var(--ink);
  padding: 6px;
  background: rgba(58, 36, 18, 0.08);
}

.poster-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  filter: sepia(0.35) contrast(1.05);
}

.poster-name {
  font-family: "Rye", serif;
  font-weight: 400;
  font-size: clamp(1.8rem, 5vw, 2.3rem);
  margin-top: 0.9rem;
  letter-spacing: 0.03em;
}

.poster-alias {
  font-family: "Permanent Marker", cursive;
  font-size: 1.05rem;
  color: var(--red-deep);
  margin-bottom: 1rem;
}

.stats {
  text-align: left;
  border-top: 2px dashed rgba(58, 36, 18, 0.5);
  padding-top: 0.9rem;
  display: grid;
  gap: 0.7rem;
}

.stat {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.6rem;
  align-items: baseline;
}

.stat dt {
  font-family: "Rye", serif;
  font-size: 0.95rem;
}

.stat dd {
  font-family: "Permanent Marker", cursive;
  font-size: 1.05rem;
  color: var(--red-deep);
}

.bar {
  grid-column: 1 / -1;
  height: 9px;
  border: 2px solid var(--ink);
  border-radius: 5px;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--c, var(--red));
  transition: width 1.2s cubic-bezier(.2, .8, .2, 1);
}

.in-view .bar i { width: var(--v); }

.stat:nth-child(1) .bar i { --c: var(--sky); }
.stat:nth-child(2) .bar i { --c: var(--red); transition-delay: 0.15s; }
.stat:nth-child(3) .bar i { --c: var(--hay); transition-delay: 0.3s; }
.stat:nth-child(4) .bar i { --c: var(--green); transition-delay: 0.45s; }

.reward {
  margin-top: 1.2rem;
  padding-top: 0.8rem;
  border-top: 2px dashed rgba(58, 36, 18, 0.5);
  font-family: "Rye", serif;
  font-size: 1.05rem;
}

.reward span { color: var(--red-deep); }

.sheriff-note {
  position: relative;
  padding: 2.2rem 2rem 2rem;
  color: var(--ink);
  background:
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(70, 120, 190, 0.28) 31px 32px),
    linear-gradient(90deg, transparent 52px, rgba(200, 50, 43, 0.35) 52px 54px, transparent 54px),
    #fbf3df;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
  transform: rotate(1.4deg);
}

/* Strip of tape holding the note */
.sheriff-note::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  width: 120px;
  height: 30px;
  margin-left: -60px;
  background: rgba(243, 210, 126, 0.75);
  transform: rotate(-3deg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.sheriff-note h2 {
  font-family: "Permanent Marker", cursive;
  font-weight: 400;
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 1rem 2.6rem;
}

.sheriff-note h2 span { color: var(--red); }

.sheriff-note p {
  margin-left: 2.6rem;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.75;
}

.sheriff-note p + p { margin-top: 0.9rem; }

.sheriff-note .sig {
  font-family: "Permanent Marker", cursive;
  font-weight: 400;
  text-align: right;
  color: var(--blue);
}

/* HOW TO BUY: mission board */
.board {
  position: relative;
  padding: 20px;
  border-radius: 10px;
}

.board-inner {
  position: relative;
  padding: 3.2rem 1.6rem 2rem;
  border-radius: 4px;
  background:
    radial-gradient(rgba(60, 30, 10, 0.35) 1px, transparent 1.6px) 0 0 / 7px 7px,
    radial-gradient(rgba(255, 230, 190, 0.18) 1px, transparent 1.6px) 3px 4px / 9px 9px,
    #a9794a;
  box-shadow: inset 0 0 40px rgba(40, 20, 6, 0.6);
}

.board-title {
  position: absolute;
  top: -10px;
  left: 50%;
  translate: -50% 0;
  padding: 0.55rem 1.8rem 0.4rem;
  border-radius: 6px;
  font-family: "Rye", serif;
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  letter-spacing: 0.06em;
  color: var(--cream);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
  white-space: nowrap;
  z-index: 1;
}

.missions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.6rem;
}

.mission {
  position: relative;
  padding: 1.8rem 1.15rem 1.3rem;
  color: var(--ink);
  background: var(--speckle), var(--note, #f6e7c1);
  box-shadow: 3px 8px 14px rgba(30, 14, 4, 0.45);
  transform: rotate(var(--r, -1.5deg));
  transition: transform 0.2s ease;
}

.mission:hover { transform: rotate(0deg) translateY(-4px) scale(1.02); }

/* Push pin */
.mission::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.75) 0 2px, var(--pin, var(--red)) 4px, rgba(0, 0, 0, 0.45) 100%);
  box-shadow: 2px 4px 4px rgba(0, 0, 0, 0.4);
}

.mission:nth-child(1) { --note: #f6e7c1; --r: -2deg; --pin: var(--red); }
.mission:nth-child(2) { --note: #f8e08e; --r: 1.6deg; --pin: var(--blue); }
.mission:nth-child(3) { --note: #d4ecf7; --r: -1deg; --pin: var(--green); }
.mission:nth-child(4) { --note: #e2efcf; --r: 2deg; --pin: var(--hay); }

.mission-no {
  display: inline-block;
  font-family: "Rye", serif;
  font-size: 0.85rem;
  color: var(--red-deep);
  border: 2px solid currentColor;
  border-radius: 4px;
  padding: 0.1rem 0.45rem 0;
  transform: rotate(-4deg);
  margin-bottom: 0.6rem;
}

.mission h3 {
  font-family: "Permanent Marker", cursive;
  font-weight: 400;
  font-size: 1.45rem;
  line-height: 1.15;
  margin-bottom: 0.45rem;
}

.mission p { font-weight: 700; line-height: 1.5; }

.mission .ca-mini {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.ca-mini code {
  flex: 1 1 100%;
  font-family: ui-monospace, Menlo, monospace;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.35rem 0.5rem;
  background: rgba(58, 36, 18, 0.1);
  border-radius: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ca-mini .btn-copy { flex: 1; font-size: 0.95rem; padding: 0.5rem 0.8rem 0.35rem; }

.stamp {
  position: absolute;
  right: 10px;
  bottom: -14px;
  font-family: "Rye", serif;
  font-size: 0.8rem;
  color: var(--red);
  border: 2px solid currentColor;
  border-radius: 4px;
  padding: 0.15rem 0.4rem 0;
  background: rgba(255, 255, 255, 0.4);
  transform: rotate(-8deg);
}

/* ROADMAP: hand-drawn map */
.map {
  position: relative;
  padding: 1.6rem;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 20%, rgba(120, 72, 24, 0.16), transparent 30%),
    radial-gradient(circle at 80% 75%, rgba(120, 72, 24, 0.2), transparent 32%),
    var(--speckle),
    #ecd6a6;
  box-shadow: inset 0 0 70px rgba(110, 66, 20, 0.55), 0 24px 44px rgba(0, 0, 0, 0.5);
  clip-path: polygon(0 2%, 6% 0, 20% 1.4%, 36% 0.3%, 52% 1.6%, 68% 0, 84% 1.2%, 100% 0.4%, 99.3% 22%, 100% 46%, 99.1% 70%, 100% 98%, 84% 99.2%, 66% 100%, 48% 98.8%, 30% 100%, 14% 99%, 0 100%, 0.8% 74%, 0 50%, 0.9% 26%);
  transform: rotate(-0.6deg);
}

.map-scroll {
  overflow-x: auto;
  scrollbar-width: thin;
}

.map svg {
  display: block;
  width: 100%;
  min-width: 680px;
  height: auto;
}

.map-label {
  font-family: "Rye", serif;
  font-size: 26px;
  fill: var(--ink);
}

.map-note {
  font-family: "Permanent Marker", cursive;
  font-size: 17px;
  fill: #6b4a2e;
}

.trail-reveal {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 3s ease-in-out;
}

.in-view .trail-reveal { stroke-dashoffset: 0; }

.drag-hint {
  display: none;
  text-align: center;
  font-family: "Permanent Marker", cursive;
  color: #6b4a2e;
  margin-top: 0.4rem;
}

.legend {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
  margin-top: 1.4rem;
  padding-top: 1.4rem;
  border-top: 2px dashed rgba(58, 36, 18, 0.45);
}

.legend h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Rye", serif;
  font-weight: 400;
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.legend h3 b {
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  flex: none;
  border-radius: 50%;
  font-family: "Luckiest Guy", cursive;
  font-weight: 400;
  font-size: 1rem;
  padding-top: 0.15rem;
  color: #fff;
  background: var(--red);
}

.legend p { font-weight: 700; line-height: 1.5; color: #5a3b22; }

/* GALLERY: photos on a clothesline */
.clothesline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3.2rem 2.2rem;
  padding-top: 0.5rem;
}

.shot {
  position: relative;
  padding-top: 30px;
}

/* Rope segment sagging toward each pin */
.shot::before {
  content: "";
  position: absolute;
  top: 0;
  left: -1.2rem;
  right: -1.2rem;
  height: 34px;
  border-bottom: 4px solid #d7b27a;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.45));
}

.photo {
  position: relative;
  width: min(100%, 300px);
  margin: 0 auto;
  padding: 10px 10px 0;
  background: #fbf6ea;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.5);
  transform-origin: 50% -6px;
  rotate: var(--r, -2deg);
  animation: sway var(--d, 5s) ease-in-out var(--delay, 0s) infinite;
  transition: scale 0.2s ease;
}

.photo:hover { scale: 1.04; animation-play-state: paused; }

/* Clothespin */
.photo::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 50%;
  width: 14px;
  height: 38px;
  margin-left: -7px;
  border-radius: 3px;
  background:
    linear-gradient(90deg, transparent 6px, rgba(0, 0, 0, 0.35) 6px 8px, transparent 8px),
    linear-gradient(180deg, #d9b583, #a97c48);
  box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.45);
  z-index: 1;
}

.photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}

.photo figcaption {
  font-family: "Permanent Marker", cursive;
  color: var(--ink);
  font-size: 1.05rem;
  text-align: center;
  padding: 0.6rem 0.3rem 0.8rem;
  line-height: 1.2;
}

.shot:nth-child(1) .photo { --r: -3deg; --d: 5.2s; }
.shot:nth-child(2) .photo { --r: 2deg; --d: 4.6s; --delay: -1.4s; }
.shot:nth-child(3) .photo { --r: -1.5deg; --d: 5.8s; --delay: -0.7s; }
.shot:nth-child(4) .photo { --r: 2.5deg; --d: 4.9s; --delay: -2.1s; }
.shot:nth-child(5) .photo { --r: -2.5deg; --d: 5.5s; --delay: -0.3s; }
.shot:nth-child(6) .photo { --r: 1.5deg; --d: 4.4s; --delay: -1.8s; }

/* CHART: dusty CRT in the barn */
.chart-section { padding-bottom: 2.2rem; }

/* Hay-covered barn floor the crate stands on */
.chart-section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 150px;
  background:
    repeating-linear-gradient(7deg, transparent 0 6px, rgba(255, 228, 160, 0.35) 6px 7px, transparent 7px 13px),
    repeating-linear-gradient(-5deg, transparent 0 9px, rgba(255, 214, 120, 0.25) 9px 11px, transparent 11px 19px),
    repeating-linear-gradient(14deg, transparent 0 15px, rgba(90, 55, 15, 0.35) 15px 16px, transparent 16px 27px),
    repeating-linear-gradient(-18deg, transparent 0 21px, rgba(90, 55, 15, 0.25) 21px 22px, transparent 22px 37px),
    linear-gradient(180deg, #8a6228, #b88a3e 30%, #a77a35);
  box-shadow: inset 0 10px 18px rgba(0, 0, 0, 0.45);
}

.chart-section .wrap { position: relative; z-index: 1; }

.crt-wrap {
  position: relative;
  width: min(920px, 100%);
  margin: 0 auto;
}

.crt {
  position: relative;
  padding: 34px 34px 74px;
  border-radius: 30px;
  background:
    var(--speckle),
    linear-gradient(160deg, #d8ccae, #b2a585 55%, #8f8366);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.5),
    inset 0 -8px 16px rgba(0, 0, 0, 0.3),
    0 30px 50px rgba(0, 0, 0, 0.6);
}

.screen {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 22px / 28px;
  overflow: hidden;
  background: radial-gradient(circle, #13301d, #050a06 75%);
  box-shadow:
    inset 0 0 0 6px #2b2a26,
    inset 0 0 40px rgba(0, 0, 0, 0.9),
    0 0 0 3px #7f7459;
}

.screen iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.no-signal {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: ui-monospace, Menlo, monospace;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #7dffa8;
  text-shadow: 0 0 8px rgba(125, 255, 168, 0.8);
  animation: flicker 2.4s steps(2) infinite;
}

.scanlines,
.glass {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
}

.scanlines {
  background: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px);
}

.scanlines::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 18%;
  background: linear-gradient(180deg, transparent, rgba(180, 255, 200, 0.06), transparent);
  animation: roll 6s linear infinite;
}

.glass {
  background:
    radial-gradient(ellipse at 30% 10%, rgba(255, 255, 255, 0.12), transparent 40%),
    radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.45) 100%);
  box-shadow: inset 0 0 0 6px #2b2a26;
}

.crt-bezel {
  position: absolute;
  left: 34px;
  right: 34px;
  bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.crt-brand {
  font-family: "Rye", serif;
  color: #5a4f3a;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.knobs { display: flex; align-items: center; gap: 0.8rem; }

.knob {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 11px, #2b2620 11px 15px, transparent 15px),
    radial-gradient(circle at 35% 30%, #8a8070, #3f3a32);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5);
}

.knob:nth-child(2) { rotate: 40deg; }

.led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #6dff8f;
  box-shadow: 0 0 8px #6dff8f;
  animation: blink 2.2s ease-in-out infinite;
}

/* Wooden crate under the monitor */
.crate {
  width: 78%;
  height: 120px;
  margin: -6px auto 0;
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0 4px, transparent 4px),
    repeating-linear-gradient(180deg, transparent 0 36px, rgba(0, 0, 0, 0.45) 36px 40px),
    var(--grain-h),
    linear-gradient(180deg, #9a6d40, #6d4826);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.45);
  position: relative;
  z-index: -1;
}

.chart-link { text-align: center; margin-top: 1.6rem; }

/* FOOTER */
footer { padding: 0 0 2.5rem; }

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.6rem;
}

.footer-bar .brand { padding-top: 0.6rem; }

.note {
  margin-top: 1.6rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  opacity: 0.75;
}

/* FLOATING HAY (whole page) */
.hay-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 30;
  overflow: hidden;
}

.straw {
  position: absolute;
  top: -40px;
  border-radius: 2px;
  background: linear-gradient(180deg, #f6d887, #c99437);
  opacity: 0.55;
  animation: fall var(--d, 22s) linear var(--delay, 0s) infinite;
}

/* ANIMATIONS */
@keyframes swing {
  0%, 100% { rotate: -2.2deg; }
  50% { rotate: 2.2deg; }
}

@keyframes jiggle {
  0%, 100% { rotate: -5deg; }
  50% { rotate: 5deg; }
}

@keyframes sway {
  0%, 100% { rotate: var(--r); }
  50% { rotate: calc(var(--r) * -0.6); }
}

@keyframes spin {
  to { transform: rotateY(360deg); }
}

@keyframes settle {
  from { transform: scale(1.08); opacity: 0.4; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes beam {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

@keyframes mote {
  from { translate: 0 0; opacity: 0.15; }
  50% { opacity: 0.9; }
  to { translate: var(--dx) var(--dy); opacity: 0.25; }
}

@keyframes fall {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(var(--sway), 55vh) rotate(200deg); }
  100% { transform: translate(0, 112vh) rotate(380deg); }
}

@keyframes rise {
  from { opacity: 0; translate: 0 16px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes roll {
  from { top: -20%; }
  to { top: 110%; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hay-layer, .dust { display: none; }
  .trail-reveal { stroke-dashoffset: 0; }
  .bar i { width: var(--v); }
}

@media (max-width: 1080px) {
  .top-inner {
    grid-template-columns: auto auto;
    justify-content: space-between;
    padding-bottom: 0;
  }

  /* Signs get their own rail on a second row */
  .top-actions { grid-row: 1; grid-column: 2; }

  .signs {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-content: flex-start;
    margin: 0 -1rem;
    padding: 0 1rem 1rem;
    overflow-x: auto;
    scrollbar-width: none;
    background:
      var(--grain-h) top / 100% 10px no-repeat,
      linear-gradient(180deg, #7d5732, #4e331c) top / 100% 10px no-repeat;
  }

  .signs::-webkit-scrollbar { display: none; }
  .sign { margin-top: 22px; flex: none; }
  .sign::before { top: -12px; height: 12px; }
  .sign:first-child { margin-left: auto; }
  .sign:last-child { margin-right: auto; }

  .missions { grid-template-columns: repeat(2, 1fr); }
  .legend { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .poster { max-width: 400px; margin: 0 auto; }
  .clothesline { grid-template-columns: repeat(2, 1fr); gap: 2.6rem 1.4rem; }
  .drag-hint { display: block; }
}

@media (max-width: 560px) {
  .brand-text small { display: none; }
  .top-actions .btn-wood span { display: none; }
  .top-actions .btn { padding: 0.6rem 0.9rem 0.45rem; }
  .scene { height: clamp(300px, 48vh, 460px); }
  .scene > img { object-position: 48% 30%; }
  .hero h1 { -webkit-text-stroke-width: 1px; text-shadow: 3px 3px 0 var(--red), 6px 6px 0 rgba(0, 0, 0, 0.55); }
  .ca { flex-wrap: wrap; padding: 0.8rem; justify-content: center; }
  .ca code { flex-basis: 100%; text-align: center; }
  .ca .btn-copy { width: 100%; }
  .ctas .btn { width: 100%; }
  .sheriff-note { padding: 2rem 1.2rem 1.6rem; }
  .sheriff-note h2, .sheriff-note p { margin-left: 2.4rem; }
  .sheriff-note p { font-size: 1rem; }
  .board { padding: 12px; }
  .board-inner { padding: 3rem 1rem 1.8rem; }
  .missions { grid-template-columns: 1fr; }
  .legend { grid-template-columns: 1fr; }
  .map { padding: 1rem; }
  .clothesline { gap: 2.2rem 1rem; }
  .shot::before { left: -0.5rem; right: -0.5rem; }
  .photo { padding: 6px 6px 0; }
  .photo figcaption { font-size: 0.85rem; padding: 0.45rem 0.1rem 0.6rem; }
  .crt { padding: 14px 14px 56px; border-radius: 20px; }
  .screen { aspect-ratio: auto; height: 440px; border-radius: 14px / 18px; }
  .crt-bezel { left: 16px; right: 16px; bottom: 12px; }
  .crt-brand { font-size: 0.8rem; }
  .knob { width: 20px; height: 20px; }
}

@media (max-width: 400px) {
  .brand-text { display: none; }
}
