:root {
  --bg: #f6efe3;
  --bg-accent: #f1dfbb;
  --panel: rgba(255, 252, 246, 0.88);
  --panel-strong: #fffaf2;
  --text: #1f1b16;
  --muted: #6d6257;
  --line: rgba(89, 70, 50, 0.14);
  --brand: #b84d21;
  --brand-dark: #7d3012;
  --shadow: 0 24px 80px rgba(74, 46, 23, 0.16);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.7), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 224, 164, 0.55), transparent 22%),
    linear-gradient(160deg, var(--bg), #f8f3ea 34%, #efe1cc 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 22rem;
  height: 22rem;
  border-radius: 999px;
  background: rgba(184, 77, 33, 0.07);
  filter: blur(20px);
  pointer-events: none;
}

body::before {
  top: -6rem;
  right: -4rem;
}

body::after {
  bottom: -10rem;
  left: -6rem;
}

.page-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 10rem;
}

.hero {
  padding: 1rem 0 0.5rem;
  animation: fade-up 550ms ease;
}

.hero__kicker,
.activity-modal__kicker {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
}

.hero h1,
.results h2,
.activity-modal h2 {
  margin: 0;
  font-family: "DM Serif Display", serif;
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.hero__lede {
  max-width: 46rem;
  margin: 0.9rem 0 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--muted);
}

.panel,
.results,
.activity-modal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel {
  position: relative;
  z-index: 2;
  margin-top: 2rem;
  padding: 1.4rem;
  animation: fade-up 700ms ease;
}

.filters {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

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

.field label,
.field__label {
  font-size: 0.94rem;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 3.2rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(103, 78, 53, 0.22);
  border-radius: 16px;
  background: rgba(255, 251, 245, 0.92);
  color: var(--text);
  font: inherit;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.field input:focus,
.field select:focus,
.filter-chip:focus-within {
  outline: none;
  border-color: rgba(184, 77, 33, 0.6);
  box-shadow: 0 0 0 4px rgba(184, 77, 33, 0.12);
  transform: translateY(-1px);
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.tag-filter-picker {
  position: relative;
}

.tag-filter-picker__input {
  padding-right: 2.8rem;
}

.tag-filter-picker::after {
  content: "▾";
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.tag-filter-picker__dropdown {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.45rem);
  left: 0;
  right: 0;
  max-height: 16rem;
  overflow-y: auto;
  padding: 0.45rem;
  border: 1px solid rgba(103, 78, 53, 0.16);
  border-radius: 18px;
  background: rgba(255, 252, 246, 0.98);
  box-shadow: 0 20px 45px rgba(88, 55, 34, 0.14);
  backdrop-filter: blur(14px);
}

.tag-filter-picker__option {
  display: block;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.7rem 0.9rem;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.tag-filter-picker__option:hover,
.tag-filter-picker__option:focus-visible {
  outline: none;
  background: rgba(255, 224, 164, 0.4);
  color: var(--brand-dark);
}

.tag-filter-picker__empty {
  margin: 0;
  padding: 0.7rem 0.9rem;
  color: var(--muted);
}

.tag-bubble-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.filter-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.8rem;
  padding: 0 1rem;
  border: 1px solid rgba(103, 78, 53, 0.18);
  border-radius: 999px;
  background: rgba(255, 248, 238, 0.95);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.filter-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(184, 77, 33, 0.44);
}

.filter-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.filter-chip span {
  font-size: 0.95rem;
  font-weight: 700;
}

.filter-chip input:checked + span {
  color: var(--brand-dark);
}

.filter-chip:has(input:checked) {
  background: rgba(255, 224, 164, 0.58);
  border-color: rgba(184, 77, 33, 0.34);
}

.filter-chip--active-tag {
  border: 1px solid rgba(184, 77, 33, 0.28);
  background: rgba(255, 224, 164, 0.58);
}

.filter-chip--active-tag span::after {
  content: " ×";
}

.filters__actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}

.secondary-button {
  min-height: 3rem;
  padding: 0 1.2rem;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: white;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.secondary-button:hover {
  transform: translateY(-1px);
  background: var(--brand-dark);
}

.results {
  position: relative;
  z-index: 1;
  margin-top: 1.5rem;
  padding: 1.4rem;
  animation: fade-up 860ms ease;
}

.site-footer {
  display: grid;
  gap: 1.4rem;
  margin-top: 1.8rem;
  padding: 1.5rem;
  background: rgba(255, 250, 242, 0.76);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.site-footer__kicker {
  margin: 0 0 0.55rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}

.site-footer h2 {
  margin: 0;
  font-family: "DM Serif Display", serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 400;
  line-height: 1.05;
}

.site-footer__intro p:last-child {
  margin: 0.7rem 0 0;
  max-width: 50rem;
  color: var(--muted);
  line-height: 1.7;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.8rem;
  padding: 0 1rem;
  border: 1px solid rgba(103, 78, 53, 0.18);
  border-radius: 999px;
  background: rgba(255, 248, 238, 0.95);
  color: var(--brand-dark);
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.site-footer__links a:hover,
.site-footer__links a:focus-visible {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(184, 77, 33, 0.44);
  background: rgba(255, 224, 164, 0.4);
}

.results__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.results h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.results__header p,
.empty-state,
.activity-card p,
.detail-grid p,
.detail-stack li {
  color: var(--muted);
}

.empty-state {
  margin: 0;
  padding: 1rem 0 0.4rem;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.activity-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  min-height: 240px;
  padding: 1.2rem;
  border: 1px solid rgba(103, 78, 53, 0.14);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 246, 232, 0.96)),
    var(--panel-strong);
  text-align: left;
  cursor: pointer;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.activity-card:hover,
.activity-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(184, 77, 33, 0.34);
  box-shadow: 0 20px 45px rgba(88, 55, 34, 0.14);
  outline: none;
}

.activity-card__cta {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.activity-card h3 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.15;
}

.activity-card p {
  margin: 0.8rem 0 0;
  line-height: 1.6;
}

.activity-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.activity-card__meta span,
.activity-card__cta {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 231, 187, 0.8);
  color: var(--brand-dark);
}

.activity-modal {
  width: min(760px, calc(100% - 1.5rem));
  padding: 1.6rem;
}

.activity-modal::backdrop {
  background: rgba(17, 12, 9, 0.55);
  backdrop-filter: blur(6px);
}

.activity-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(103, 78, 53, 0.08);
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
}

.activity-modal h2 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
}

.activity-modal__description {
  max-width: 56ch;
  line-height: 1.75;
}

.detail-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-top: 1.6rem;
}

.detail-grid h3,
.detail-stack h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.detail-grid p {
  margin: 0;
  line-height: 1.6;
}

.detail-stack {
  display: grid;
  gap: 1rem;
  margin-top: 1.6rem;
}

.tag-details {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.tag-details summary {
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  list-style: none;
}

.tag-details summary::-webkit-details-marker {
  display: none;
}

.tag-details summary::after {
  content: "+";
  float: right;
  color: var(--brand-dark);
}

.tag-details[open] summary::after {
  content: "−";
}

.tag-details__content {
  margin-top: 0.85rem;
}

.tag-details__content p,
.tag-details__empty {
  margin: 0 0 0.8rem;
  color: var(--muted);
}

.tag-bubble {
  min-height: 2.4rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(108, 121, 211, 0.24);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(162, 171, 239, 0.95), rgba(126, 139, 225, 0.92));
  color: white;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.tag-bubble:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(85, 95, 175, 0.24);
}

.detail-stack section {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.detail-stack ul {
  margin: 0;
  padding-left: 1.2rem;
}

.detail-stack li {
  line-height: 1.75;
}

.detail-stack a {
  color: var(--brand-dark);
  font-weight: 700;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .filters,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .results__header {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 1rem, 100%);
    padding-top: 2rem;
    padding-bottom: 8rem;
  }

  .panel,
  .results,
  .activity-modal {
    border-radius: 20px;
  }

  .activity-card {
    min-height: 220px;
  }
}
