:root {
  color-scheme: light;
  --bg: #f7efe6;
  --ink: #1c1b1f;
  --muted: rgba(28, 27, 31, 0.65);
  --accent: #f05f46;
  --accent-2: #1f8a8a;
  --card: #ffffff;
  --card-shadow: rgba(20, 18, 24, 0.15);
  --border: rgba(28, 27, 31, 0.12);
  --highlight: #f9d9b5;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background: radial-gradient(circle at 12% 18%, #ffe7cf, transparent 50%),
    radial-gradient(circle at 80% 0%, #d9f2f0, transparent 45%),
    radial-gradient(circle at 40% 100%, #fce7ef, transparent 50%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.ambient {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.04) 1px,
      transparent 1px
    ),
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

.back-link {
  position: fixed;
  top: 24px;
  left: 24px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 24px var(--card-shadow);
  z-index: 3;
  font-size: 0.9rem;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
  animation: rise 0.8s ease-out;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.badge {
  text-transform: uppercase;
  letter-spacing: 0.35rem;
  font-size: 0.7rem;
  color: var(--muted);
}

h1 {
  font-family: "Fraunces", serif;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  line-height: 1.05;
}

.lead {
  max-width: 640px;
  font-size: 1.05rem;
  color: var(--muted);
}

.hero-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.hero-cards article {
  background: var(--card);
  padding: 1.2rem 1.4rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px var(--card-shadow);
}

.hero-cards h2 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.controls {
  background: var(--card);
  border-radius: 20px;
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: 0 14px 28px var(--card-shadow);
  display: grid;
  gap: 1.4rem;
}

.search label {
  font-weight: 600;
}

.search input {
  margin-top: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 1rem;
}

.filters {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.filter-group {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: 14px;
  background: #fdf7f1;
  border: 1px dashed rgba(28, 27, 31, 0.15);
}

.filter-group h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12rem;
  color: var(--muted);
}

.filter-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.active {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  justify-content: space-between;
}

#resultsCount {
  font-weight: 600;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.active-filters span {
  background: var(--highlight);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

#resetFilters {
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

.catalog {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.catalog-head h2 {
  font-size: 1.6rem;
}

.catalog-head p {
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--card);
  padding: 1.2rem 1.3rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 28px var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-height: 260px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(20, 18, 24, 0.2);
}

.card h3 {
  font-size: 1.1rem;
}

.card .meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.card ul {
  display: grid;
  gap: 0.4rem;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.cta {
  margin-top: auto;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
}

.no-results {
  padding: 1rem;
  background: #fff3e5;
  border-radius: 12px;
  border: 1px solid rgba(240, 95, 70, 0.4);
}

.purchase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
  background: #101418;
  color: #f7f5f0;
  padding: 1.6rem;
  border-radius: 24px;
}

.purchase h2 {
  font-family: "Fraunces", serif;
  font-size: 1.4rem;
}

.purchase p {
  color: rgba(247, 245, 240, 0.7);
  margin: 0.6rem 0 1rem;
}

.link-list {
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.link-list a {
  color: #f9c86d;
  text-decoration: none;
  font-weight: 600;
}

.link-list a:hover {
  text-decoration: underline;
}

.checklist {
  background: var(--card);
  padding: 1.4rem;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.checklist h2 {
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
}

.checklist ol {
  padding-left: 1.2rem;
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
}

.disclaimer {
  color: var(--muted);
  font-size: 0.9rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .back-link {
    position: static;
    margin: 1.2rem 1.5rem 0;
    display: inline-flex;
  }

  .wrap {
    padding-top: 1.5rem;
  }

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