/*
Theme Name: htxscavengerhunts
Theme URI: https://example.com/
Author: htxscavengerhunts
Description: A custom WordPress theme for family scavenger hunts in Houston, with editable hunt pages and payment links.
Version: 1.0.0
License: GPL-2.0-or-later
Text Domain: htxscavengerhunts
*/

:root {
  color-scheme: dark;
  --ink: #f8f3e8;
  --muted: #b8b4aa;
  --asphalt: #111311;
  --street: #191b18;
  --panel: #22241f;
  --line: rgba(248, 243, 232, 0.14);
  --lime: #ccff00;
  --orange: #ff6a2a;
  --blue: #29c7d9;
  --pink: #f4449b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 46px 46px,
    linear-gradient(180deg, #10120f 0%, #181a17 46%, #0f100e 100%);
  color: var(--ink);
}

body.admin-bar .topbar {
  top: 32px;
}

a {
  color: inherit;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0e0f0d;
}

.page {
  overflow: hidden;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 16, 14, 0.82);
  backdrop-filter: blur(18px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 38px;
  color: #111311;
  background: var(--lime);
  border: 2px solid #111311;
  box-shadow: 5px 5px 0 var(--orange);
  font-size: 0.82rem;
  transform: rotate(-4deg);
}

.nav-links,
.menu {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a,
.menu a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.menu a:hover,
.menu a:focus-visible {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover,
.wp-block-button__link:hover {
  transform: translateY(-2px);
}

.button-primary,
.wp-block-button__link {
  color: #111311;
  background: var(--lime);
  box-shadow: 6px 6px 0 var(--orange);
}

.button-secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line);
}

.hero,
.detail-hero {
  min-height: 92svh;
  display: grid;
  align-items: end;
  padding: 110px 0 44px;
  position: relative;
  isolation: isolate;
}

.hero::before,
.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(11, 12, 11, 0.24) 0%, rgba(11, 12, 11, 0.76) 62%, #10120f 100%),
    linear-gradient(90deg, rgba(11, 12, 11, 0.92) 0%, rgba(11, 12, 11, 0.44) 48%, rgba(11, 12, 11, 0.88) 100%),
    var(--hero-image, url("https://commons.wikimedia.org/wiki/Special:FilePath/Buffalo%20Bayou%20-%20Downtown%20Houston.jpg?width=1800")) center 28% / cover;
}

.hero::after {
  content: "HOUSTON";
  position: absolute;
  right: -24px;
  bottom: 18vh;
  z-index: -1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(248, 243, 232, 0.2);
  font-size: clamp(4rem, 17vw, 14rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.8;
  transform: rotate(-3deg);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 28px;
  align-items: end;
}

.eyebrow,
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  color: var(--lime);
  font-size: 0.84rem;
  font-weight: 900;
  text-transform: uppercase;
  text-decoration: none;
}

.eyebrow::before,
.back-link::before {
  content: "";
  width: 34px;
  height: 4px;
  background: var(--orange);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 860px;
  margin-bottom: 18px;
  font-size: clamp(3rem, 9vw, 6.8rem);
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-title span {
  display: block;
}

.hero-copy {
  max-width: 700px;
  color: #efe8d7;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.quick-panel {
  border: 1px solid var(--line);
  background: rgba(17, 19, 17, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.quick-panel header {
  padding: 18px 18px 0;
}

.quick-panel h2 {
  margin-bottom: 7px;
  font-size: 1rem;
  text-transform: uppercase;
}

.quick-panel p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.score-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 18px;
  background: var(--line);
  border-top: 1px solid var(--line);
}

.score,
.fact {
  min-height: 94px;
  padding: 15px;
  background: rgba(25, 27, 24, 0.92);
}

.score strong,
.fact strong {
  display: block;
  margin-bottom: 4px;
  color: var(--lime);
  font-size: 1.55rem;
  line-height: 1;
}

.score span,
.fact span {
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 750;
  text-transform: uppercase;
}

section {
  padding: 76px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.section-head h2 {
  max-width: 640px;
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.96;
  text-transform: uppercase;
}

.section-head p {
  max-width: 430px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.routes,
.overview {
  background:
    linear-gradient(180deg, rgba(255, 106, 42, 0.08), transparent 24%),
    var(--asphalt);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-button {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
}

.filter-button[aria-pressed="true"] {
  color: #111311;
  background: var(--blue);
  border-color: var(--blue);
}

.hunt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.hunt-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  color: inherit;
  background: var(--panel);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.hunt-card:hover .button,
.hunt-card:focus-visible .button {
  transform: translateY(-2px);
}

.hunt-card[hidden] {
  display: none;
}

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.card-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
}

.tag {
  position: absolute;
  left: 13px;
  bottom: 13px;
  z-index: 2;
  padding: 7px 10px;
  color: #111311;
  background: var(--lime);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.hunt-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.hunt-body h3 {
  margin-bottom: 8px;
  font-size: 1.4rem;
  line-height: 1;
  text-transform: uppercase;
}

.hunt-body p {
  color: var(--muted);
  line-height: 1.5;
}

.meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: auto 0 18px;
}

.meta span {
  min-height: 54px;
  padding: 9px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.meta strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 0.95rem;
}

.steps {
  background:
    linear-gradient(90deg, rgba(41, 199, 217, 0.12), transparent 34%),
    #151714;
}

.step-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.step {
  min-height: 172px;
  padding: 24px;
  border-top: 4px solid var(--orange);
  background: rgba(255, 255, 255, 0.055);
}

.step:nth-child(even) {
  border-top-color: var(--blue);
}

.step b {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 22px;
  color: #111311;
  background: var(--lime);
  font-weight: 950;
}

.step h3 {
  margin-bottom: 9px;
  font-size: 1.25rem;
  text-transform: uppercase;
}

.step p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.map-band {
  position: relative;
  min-height: 420px;
  display: grid;
  align-items: end;
  padding: 70px 0;
  isolation: isolate;
}

.map-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(16, 18, 15, 0.94), rgba(16, 18, 15, 0.38), rgba(16, 18, 15, 0.92)),
    linear-gradient(180deg, rgba(16, 18, 15, 0.2), #10120f),
    url("https://commons.wikimedia.org/wiki/Special:FilePath/Discovery%20green.JPG?width=1800") center / cover;
}

.map-copy {
  max-width: 610px;
}

.map-copy h2 {
  margin-bottom: 14px;
  font-size: clamp(2.3rem, 7vw, 5.4rem);
  line-height: 0.9;
  text-transform: uppercase;
}

.map-copy p {
  color: #efe8d7;
  font-size: 1.08rem;
  line-height: 1.55;
}

.zones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.zone {
  padding: 8px 11px;
  color: #111311;
  background: var(--pink);
  font-weight: 900;
  text-transform: uppercase;
}

.zone:nth-child(2n) {
  background: var(--blue);
}

.zone:nth-child(3n) {
  background: var(--lime);
}

.book,
.pick-band {
  background:
    linear-gradient(135deg, rgba(244, 68, 155, 0.12), transparent 28%),
    var(--asphalt);
}

.book-grid,
.overview-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: start;
}

.photo-stack {
  display: grid;
  grid-template-columns: 1fr 0.68fr;
  gap: 12px;
  min-height: 440px;
}

.photo-stack figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
}

.photo-stack figure:first-child {
  grid-row: span 2;
}

.signup,
.content-panel,
.pick-box,
.page-content {
  padding: 26px;
  border: 1px solid var(--line);
  background: rgba(34, 36, 31, 0.92);
  box-shadow: var(--shadow);
}

.signup h2,
.content-panel h2,
.pick-box h2,
.page-content h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.signup p,
.content-panel p,
.pick-box p,
.page-content p {
  color: var(--muted);
  line-height: 1.55;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 22px 0;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.28);
  font: inherit;
  padding: 12px;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

.full {
  grid-column: 1 / -1;
}

.fine-print,
.payment-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.facts {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--line);
  box-shadow: var(--shadow);
}

.highlight-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.highlight-list li {
  min-height: 74px;
  padding: 14px;
  border-top: 4px solid var(--blue);
  background: rgba(255, 255, 255, 0.055);
  font-weight: 800;
  line-height: 1.35;
}

.pick-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: center;
}

.pick-box p {
  margin-bottom: 0;
}

.admin-payment-note {
  margin-top: 16px;
  padding: 12px;
  border-left: 4px solid var(--orange);
  color: var(--ink);
  background: rgba(255, 106, 42, 0.12);
}

.htx-purchased-hunts {
  margin: 24px 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--lime);
  color: var(--ink);
  background: rgba(34, 36, 31, 0.94);
}

.htx-purchased-hunts h2 {
  margin-bottom: 12px;
  font-size: 1.35rem;
  text-transform: uppercase;
}

.htx-purchased-hunts ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.htx-purchased-hunts a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  color: #111311;
  background: var(--lime);
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
}

.play-hero {
  min-height: 74svh;
}

.progress-shell {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 560px;
  margin-top: 28px;
}

.progress-bar {
  flex: 1;
  height: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.34);
}

.progress-bar span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--lime);
  box-shadow: 4px 0 0 var(--orange);
  transition: width 180ms ease;
}

.progress-shell strong {
  min-width: 48px;
  color: var(--lime);
  font-size: 1.1rem;
}

.play-route {
  background:
    linear-gradient(180deg, rgba(41, 199, 217, 0.1), transparent 28%),
    var(--asphalt);
}

.hunt-briefing {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.hunt-briefing > div {
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(34, 36, 31, 0.94);
}

.hunt-briefing span,
.extra-panel h2 {
  display: block;
  margin-bottom: 8px;
  color: var(--lime);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hunt-briefing strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.05;
}

.briefing-wide {
  grid-column: 1 / -1;
}

.briefing-wide ul,
.extra-panel ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.45;
}

.clue-list {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.clue-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--orange);
  background: rgba(34, 36, 31, 0.94);
  box-shadow: var(--shadow);
}

.clue-card.is-complete {
  border-top-color: var(--lime);
}

.clue-topline {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.clue-number {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #111311;
  background: var(--lime);
  font-weight: 950;
}

.clue-card h3 {
  margin-bottom: 6px;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1;
  text-transform: uppercase;
}

.clue-location {
  margin-bottom: 0;
  color: var(--blue);
  font-size: 0.84rem;
  font-weight: 900;
  text-transform: uppercase;
}

.clue-copy {
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1.6;
}

.clue-reveal {
  margin-top: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.055);
}

.clue-reveal summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: var(--lime);
  font-weight: 900;
  cursor: pointer;
}

.clue-reveal p {
  margin: 0;
  padding: 0 14px 14px;
  color: var(--muted);
  line-height: 1.55;
}

.clue-reveal.answer summary {
  color: var(--orange);
}

.clue-reveal.bonus summary {
  color: var(--pink);
}

.clue-done {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  color: var(--ink);
  font-size: 0.9rem;
  text-transform: none;
}

.clue-done input {
  width: 22px;
  min-height: 22px;
  accent-color: var(--lime);
}

.extras-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.extra-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--blue);
  background: rgba(34, 36, 31, 0.94);
  box-shadow: var(--shadow);
}

.extra-panel:nth-child(2) {
  border-top-color: var(--pink);
}

.extra-panel:nth-child(3) {
  border-top-color: var(--lime);
}

.extra-panel h2 {
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1.05;
}

.page-wrap {
  min-height: 70svh;
  padding: 120px 0 76px;
}

footer {
  padding: 34px 0 98px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #0d0e0c;
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
}

.credits a {
  color: var(--ink);
  text-decoration-color: rgba(204, 255, 0, 0.6);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .nav-links,
  .menu {
    display: none;
  }

  .hero,
  .detail-hero {
    min-height: 90svh;
    padding-top: 96px;
  }

  .hero-grid,
  .book-grid,
  .overview-grid,
  .pick-box,
  .extras-grid {
    grid-template-columns: 1fr;
  }

  .quick-panel {
    max-width: 520px;
  }

  .section-head {
    display: block;
  }

  .section-head p {
    margin-top: 14px;
  }

  .hunt-grid {
    grid-template-columns: 1fr;
  }

  .hunt-card {
    display: grid;
    grid-template-columns: 0.82fr 1fr;
  }

  .card-media {
    min-height: 100%;
    aspect-ratio: auto;
  }

  .photo-stack {
    min-height: 340px;
  }

  .pick-box .button {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 782px) {
  body.admin-bar .topbar {
    top: 46px;
  }
}

@media (max-width: 640px) {
  .shell {
    width: 100%;
    margin-right: 0;
    margin-left: 0;
    padding-right: 36px;
    padding-left: 36px;
  }

  .brand span:last-child {
    max-width: 170px;
    line-height: 0.96;
  }

  .nav {
    justify-content: flex-start;
  }

  .nav > .button {
    display: none;
  }

  .hero,
  .detail-hero {
    min-height: auto;
    padding: 100px 0 42px;
  }

  .hero::after {
    bottom: 35vh;
    right: -10px;
    font-size: 5rem;
  }

  h1 {
    font-size: clamp(2.7rem, 13vw, 3.35rem);
    line-height: 0.94;
  }

  .section-head h2,
  .map-copy h2,
  .signup h2,
  .content-panel h2,
  .pick-box h2 {
    font-size: clamp(1.9rem, 8.8vw, 2.35rem);
    line-height: 1;
  }

  .hero-actions {
    display: grid;
  }

  .hero-actions .button,
  .button {
    width: 100%;
  }

  .quick-panel {
    margin-top: 18px;
  }

  .score-row,
  .meta,
  .step-grid,
  .field-grid,
  .hunt-briefing,
  .highlight-list {
    grid-template-columns: 1fr;
  }

  section {
    padding: 54px 0;
  }

  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
  }

  .filter-button {
    flex: 0 0 auto;
  }

  .hunt-card {
    display: flex;
  }

  .card-media {
    aspect-ratio: 16 / 11;
  }

  .photo-stack {
    grid-template-columns: 1fr;
  }

  .photo-stack figure,
  .photo-stack figure:first-child {
    min-height: 220px;
    grid-row: auto;
  }

  .signup,
  .content-panel,
  .pick-box,
  .page-content,
  .clue-card {
    padding: 20px;
  }

  .progress-shell {
    display: grid;
  }
}
