/* Hunt Map
   Theme colors: orange #ff7504, green #17bf17, purple #491871,
   bone #e9e2cf, night #16151c.
-------------------------------------------------- */

.hunt-map {
    color: #e9e2cf;
}

/* Top: tally, Polaroid and map */
.hm {
    max-width: 760px;
    margin: 0 auto;
    padding: 1.5rem 1rem 0;
}

.hm-tally {
    text-align: center;
    font-size: 1.15rem;
    margin: 0 0 1.5rem;
}

.hm-tally b {
    color: #17bf17;
}

/* Today's Haunt Polaroid */
.hm-polaroid {
    position: relative;
    max-width: 520px;
    margin: 0 auto 2rem;
    padding: 12px 12px 16px;
    background: #f4f1e8;
    color: #222;
    transform: rotate(-2deg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .6);
}

/* Strip of tape */
.hm-polaroid::before {
    content: "";
    position: absolute;
    top: -14px;
    left: 50%;
    width: 110px;
    height: 28px;
    margin-left: -55px;
    background: rgba(255, 117, 4, .75);
    transform: rotate(3deg);
}

.hm-polaroid img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.hm-polaroid figcaption {
    margin-top: .6rem;
    font-size: 1.05rem;
    line-height: 1.4;
}

.hm-polaroid__title {
    display: block;
    font-family: JollyLodger;
    font-size: 2rem;
    line-height: 1;
    color: #491871;
}

.hm-polaroid__zone {
    display: block;
    margin-top: .35rem;
    font-weight: 700;
    color: #0f7a0f;
}

/* The map */
.hm-mapwrap {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 0 0 2px rgba(233, 226, 207, .2), 0 0 1.5rem .5rem rgba(73, 24, 113, .6);
}

.hm-map {
    display: block;
    width: 100%;
    height: auto;
}

.hm-roads .r {
    stroke: #e9e2cf;
    stroke-opacity: .5;
    stroke-width: 5;
}

/* Interstates */
.hm-roads .r--i {
    stroke-opacity: .8;
    stroke-width: 9;
}

/* Route 37 bypass */
.hm-roads .r--37 {
    stroke-dasharray: 16 8;
}

.hm-roadlabels text {
    font-family: Arial, sans-serif;
    font-style: italic;
    font-size: 28px;
    fill: #e9e2cf;
    fill-opacity: .55;
}

.hm-town {
    font-family: Arial, sans-serif;
    font-size: 31px;
    fill: #e9e2cf;
    fill-opacity: .85;
}

.hm-town-dot {
    fill: #e9e2cf;
    fill-opacity: .6;
}

.hm-cityname {
    font-family: JollyLodger;
    font-size: 40px;
    text-anchor: middle;
    letter-spacing: 2px;
    fill: #ff7504;
    fill-opacity: .85;
}

.hm-compass text {
    font-family: JollyLodger;
    font-size: 34px;
    fill: #ff7504;
}

.hm-scale {
    font-family: Arial, sans-serif;
    font-style: italic;
    font-size: 24px;
    fill: #e9e2cf;
    fill-opacity: .45;
}

/* Zone tombstones on the map */
.hm-zone,
.hm-zone text {
    text-decoration: none;
}

.hm-stone {
    fill: #cfc8b6;
    stroke: #16151c;
    stroke-width: 4;
}

.hm-count {
    font-family: JollyLodger;
    font-size: 72px;
    text-anchor: middle;
    fill: #2c2c2c;
}

.hm-unit {
    font-family: Arial, sans-serif;
    font-weight: 700;
    font-size: 22px;
    text-anchor: middle;
    fill: #2c2c2c;
}

.hm-name {
    font-family: JollyLodger;
    font-size: 40px;
    text-anchor: middle;
    fill: #ff7504;
    paint-order: stroke;
    stroke: #16151c;
    stroke-width: 8px;
}

.hm-zone.is-empty .hm-stone {
    fill: #4a4752;
}

.hm-zone.is-empty .hm-unit {
    fill: #bdb6a6;
    font-weight: 400;
}

.hm-zone.is-empty .hm-name {
    fill: #a59f92;
}

.hm-zone.is-today .hm-stone {
    fill: #d9ffd9;
    stroke: #17bf17;
    filter: url(#hm-glow);
}

.hm-zone.is-today .hm-name {
    fill: #17bf17;
}

.hm-zone:focus-visible .hm-stone {
    stroke: #fff;
    stroke-width: 8;
}

.hm-ghost {
    animation: hm-float 2.6s ease-in-out infinite alternate;
}

@keyframes hm-float {
    to { transform: translateY(-12px); }
}

/* Legend */
.hm-legend {
    text-align: center;
    font-size: .9rem;
    color: #bdb6a6;
    margin: .75rem 0 2rem;
}

.hm-dot {
    display: inline-block;
    width: .8em;
    height: .8em;
    border-radius: 50%;
    margin: 0 .3em 0 .9em;
    vertical-align: -.05em;
}

.hm-dot--today { background: #17bf17; }
.hm-dot--out { background: #cfc8b6; }
.hm-dot--soon { background: #4a4752; }

/* Desktop: Polaroid beside the map */
@media (min-width: 992px) {
    .hm {
        max-width: 1140px;
        display: grid;
        grid-template-columns: 5fr 6fr;
        column-gap: 3rem;
        align-items: start;
    }

    .hm-tally {
        grid-column: 1 / -1;
    }

    .hm-polaroid {
        grid-column: 1;
        grid-row: 2;
        margin-top: 2rem;
        position: sticky;
        top: 2rem;
    }

    .hm-mapwrap {
        grid-column: 2;
        grid-row: 2;
    }

    .hm-legend {
        grid-column: 2;
        grid-row: 3;
    }

    /* No clue today: center the map. */
    .hm:not(:has(.hm-polaroid)) .hm-mapwrap,
    .hm:not(:has(.hm-polaroid)) .hm-legend {
        grid-column: 1 / -1;
        width: 100%;
        max-width: 640px;
        justify-self: center;
    }
}

/* Graveyard of zones
-------------------------------------------------- */
.by-yard {
    position: relative;
    overflow: hidden;
    /* Full screen width, even inside the page's centered content area. */
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    box-sizing: border-box;
    padding: 7.5rem 1rem 0;
    background: linear-gradient(#0d0c14 0%, #1b1530 60%, #22192e 100%);
}

@media (min-width: 768px) {
    .by-yard {
        padding-top: 6rem;
    }
}

.by-moon {
    position: absolute;
    top: .9rem;
    right: 8%;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f3e9b5;
    box-shadow: 0 0 40px 10px rgba(243, 233, 181, .35);
}

.by-stones {
    position: relative;
    z-index: 1;
    list-style: none;
    margin: 0 auto;
    padding: 0;
    max-width: 1000px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem 1rem;
}

@media (min-width: 768px) {
    .by-stones {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .by-stones {
        grid-template-columns: repeat(5, 1fr);
    }
}

.by-stone {
    position: relative;
    text-align: center;
    scroll-margin-top: 120px;
}

.by-stone:target .by-slab {
    outline: 3px solid #fff;
    outline-offset: 4px;
}

.by-slab {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: min(124px, 100%);
    aspect-ratio: 3 / 4;
    margin: 0 auto;
    border-radius: 70px 70px 6px 6px;
    background: linear-gradient(160deg, #d7d0bd, #9c9584);
    box-shadow: inset -8px -8px 0 rgba(0, 0, 0, .18), 0 8px 0 #0a0910;
    color: #2a2620;
}

.by-rip {
    font-family: JollyLodger;
    font-size: 1.2rem;
    opacity: .75;
}

.by-n {
    font-family: Nosifer;
    font-size: 2.6rem;
    line-height: 1.1;
}

.by-u {
    font-weight: 700;
}

.by-name {
    font-family: JollyLodger;
    font-size: 1.9rem;
    line-height: 1;
    color: #ff7504;
    margin: .75rem 0 0;
}

.by-hosts {
    list-style: none;
    margin: .35rem 0 0;
    padding: 0;
    font-size: .85rem;
    line-height: 1.35;
    color: #bdb6a6;
}

.by-hosts li + li {
    margin-top: .2rem;
}

.by-today {
    font-weight: 700;
    color: #17bf17;
    margin: .25rem 0 0;
}

/* No signs yet: a fresh dirt mound */
.by-stone.is-empty .by-slab {
    position: relative;
    justify-content: flex-start;
    height: 150px;
    aspect-ratio: auto;
    padding-top: 2.5rem;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

.by-stone.is-empty .by-slab::before {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: 0;
    height: 46px;
    border-radius: 50% 50% 0 0;
    background: #3b2a20;
    box-shadow: inset 0 6px 0 #4d382b;
}

.by-stone.is-empty .by-rip {
    color: #bdb6a6;
}

.by-stone.is-empty .by-name {
    color: #a59f92;
}

/* Today's zone glows, with a ghost on top */
.by-stone.is-today .by-slab {
    background: linear-gradient(160deg, #e8ffe8, #9fd99f);
    box-shadow: 0 0 1.5rem .6rem rgba(23, 191, 23, .75), 0 8px 0 #0a0910;
}

.by-stone.is-today .by-name {
    color: #17bf17;
}

.by-ghost {
    position: absolute;
    top: -52px;
    left: 50%;
    width: 46px;
    height: 56px;
    margin-left: -23px;
    background: #f4f1e8;
    border-radius: 23px 23px 0 0;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 83% 86%, 66% 100%, 50% 86%, 33% 100%, 17% 86%, 0 100%);
    animation: by-float 2.6s ease-in-out infinite alternate;
}

.by-ghost::before,
.by-ghost::after {
    content: "";
    position: absolute;
    top: 18px;
    width: 8px;
    height: 10px;
    border-radius: 50%;
    background: #16151c;
}

.by-ghost::before { left: 13px; }
.by-ghost::after { right: 13px; }

@keyframes by-float {
    to { transform: translateY(-10px); }
}

.by-ground {
    position: relative;
    height: 70px;
    margin: -20px -1rem 0;
    background: radial-gradient(120% 100% at 50% 100%, #1a2a14 60%, transparent 61%), #22192e;
}

.hm-note {
    text-align: center;
    color: #a59f92;
    margin: 1.5rem 1rem;
}

/* Home-page teaser block */
.hm-polaroid--teaser {
    max-width: min(320px, calc(100% - 3rem));
    margin: 2.5rem auto 1.25rem;
}

.hm-polaroid--teaser figcaption {
    font-size: .95rem;
}

.hm-polaroid--teaser .hm-polaroid__title {
    font-size: 1.7rem;
}

@media (prefers-reduced-motion: reduce) {
    .hm-ghost,
    .by-ghost {
        animation: none;
    }
}

/* Sponsors: "Brought to you by" on a solved riddle, and the leaderboard strip
-------------------------------------------------- */
.gh-sponsor {
    margin: 1rem 0 .25rem;
    padding: .9rem 1rem 1rem;
    border: 2px dashed rgba(255, 117, 4, .7);
    border-radius: 10px;
    text-align: center;
}

.gh-sponsor__lead {
    margin: 0 0 .6rem;
    font-size: .9rem;
    color: #c9c9c9;
}

.gh-sponsor__link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    text-decoration: none;
}

.gh-sponsor__logo {
    display: block;
    max-width: 100%;
    max-height: 120px;
    width: auto;
    margin: 0 auto;
    padding: 10px 16px;
    background: #ffffff;
    border-radius: 8px;
}

.gh-sponsor__name {
    display: block;
    font-family: JollyLodger;
    font-size: 1.6rem;
    line-height: 1.1;
    color: #ff7504;
}

.gh-sponsor__link:hover .gh-sponsor__name,
.gh-sponsor__link:focus .gh-sponsor__name {
    text-decoration: underline;
}

.gh-sponsors {
    margin: 1.5rem auto 0;
    padding: 1rem;
    text-align: center;
}

.gh-sponsors__title {
    margin: 0 0 .75rem;
    font-family: JollyLodger;
    font-size: 1.8rem;
    color: #ff7504;
}

.gh-sponsors__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75rem;
}

.gh-sponsors__item img {
    display: block;
    height: 110px;
    width: auto;
    max-width: 300px;
    object-fit: contain;
    padding: 10px 16px;
    background: #ffffff;
    border-radius: 10px;
}

@media (max-width: 575px) {
    .gh-sponsors__item img {
        height: 84px;
        max-width: 240px;
    }
}

.gh-sponsors__item a:focus-visible img {
    outline: 3px solid #ff7504;
    outline-offset: 2px;
}
