:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #e5e1d4;
  color: #17231a;
  --ink: #17231a;
  --paper: #f3efe3;
  --muted: #687269;
  --line: rgba(31, 50, 35, 0.15);
  --accent: #436547;
  --soft: #dbe4cf;
}

* {
  box-sizing: border-box;
}

html {
  background: #e5e1d4;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 86% 0%, rgba(255, 255, 248, 0.88), transparent 28%),
    linear-gradient(140deg, #ece7d9, #d8dfd0 65%, #ccd8c6);
  color: var(--ink);
}

a,
button,
input,
select {
  font: inherit;
  outline-color: #496e4d;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(73, 110, 77, 0.42);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(241, 238, 228, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  color: var(--ink);
  font: 1.34rem Georgia, serif;
  text-decoration: none;
  letter-spacing: -0.035em;
}

.brand b {
  margin-right: 7px;
  color: #547657;
}

.site-nav {
  display: flex;
  gap: 16px;
  font-size: 0.72rem;
}

.site-nav a {
  color: #49634d;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 430px);
  gap: 36px;
  align-items: end;
  padding: clamp(48px, 8vw, 112px) clamp(18px, 5vw, 76px) 40px;
}

.eyebrow {
  margin: 0 0 11px;
  color: #58745a;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

h1 {
  max-width: 960px;
  margin: 0;
  font: 400 clamp(2.8rem, 7vw, 6.4rem) / 0.91 Georgia, serif;
  letter-spacing: -0.065em;
}

.hero-copy {
  margin: 0;
  color: #59655e;
  font-size: 0.83rem;
  line-height: 1.75;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(170px, 0.7fr) auto;
  gap: 12px;
  align-items: end;
  margin: 0 clamp(18px, 5vw, 76px) 20px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: rgba(247, 244, 235, 0.73);
  box-shadow: 0 20px 55px rgba(41, 52, 37, 0.07);
  backdrop-filter: blur(16px);
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: #5e6961;
  font-size: 0.67rem;
  font-weight: 750;
}

.field input,
.field select {
  width: 100%;
  height: 43px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 250, 0.78);
  color: var(--ink);
}

.clear {
  min-height: 43px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: transparent;
  color: #4e6252;
  cursor: pointer;
}

.clear[hidden] {
  visibility: hidden;
}

.catalog-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 0 clamp(18px, 5vw, 76px) 22px;
  color: #69736b;
  font-size: 0.69rem;
  line-height: 1.5;
}

.catalog-meta p {
  margin: 0;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  padding: 0 clamp(12px, 3vw, 44px) 64px;
}

.catalog-card {
  grid-column: span 4;
  display: grid;
  grid-template-rows: 210px 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: rgba(247, 244, 235, 0.78);
  box-shadow: 0 24px 60px rgba(39, 50, 35, 0.09);
  backdrop-filter: blur(15px);
}

.catalog-card.featured {
  grid-column: span 6;
  grid-template-rows: 260px 1fr;
}

.motif {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #e8ead9, #b8c8a5);
}

.motif::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 68% 20%, rgba(255, 255, 228, 0.75), transparent 34%),
    linear-gradient(transparent 65%, rgba(32, 59, 37, 0.22));
}

.motif i {
  position: absolute;
  left: var(--stem-left);
  bottom: -4%;
  width: 2px;
  height: var(--stem-height);
  border-radius: 999px;
  background: rgba(35, 83, 44, 0.76);
  box-shadow: 0 0 0 0.2px rgba(16, 43, 24, 0.2);
  transform: rotate(var(--stem-angle));
  transform-origin: bottom center;
}

.motif i::after {
  content: "";
  position: absolute;
  top: 8%;
  left: 50%;
  width: var(--leaf-width);
  height: 42%;
  border-radius: 90% 8% 90% 8%;
  background: rgba(72, 119, 67, 0.66);
  transform: rotate(var(--leaf-angle));
  transform-origin: bottom left;
}

.motif-taxon {
  background: linear-gradient(180deg, #edf0df, #abc18d);
}

.motif-taxon i {
  background: rgba(31, 91, 47, 0.78);
}

.motif-archetype {
  background: linear-gradient(180deg, #e8e6d5, #c3c7a2);
}

.motif-fantasy {
  background: linear-gradient(180deg, #dfe4e0, #9ebca9);
}

.motif-fantasy i {
  background: rgba(67, 105, 94, 0.82);
  filter: drop-shadow(0 0 8px rgba(222, 247, 209, 0.75));
}

.motif-fantasy i::after {
  background: rgba(186, 222, 192, 0.75);
  box-shadow: 0 0 12px rgba(220, 255, 218, 0.85);
}

.motif-experience {
  background: linear-gradient(180deg, #dce6bd, #66895a);
}

.motif-laboratory {
  background: linear-gradient(180deg, #e5e7dd, #aeb8a9);
}

.motif-laboratory::after {
  content: "";
  position: absolute;
  inset: 24% 8% 16%;
  border: 1px solid rgba(35, 59, 41, 0.2);
  background:
    repeating-linear-gradient(90deg, transparent 0 9%, rgba(40, 65, 46, 0.1) 9% 9.4%),
    repeating-linear-gradient(0deg, transparent 0 18%, rgba(40, 65, 46, 0.1) 18% 18.8%);
}

.card-body {
  display: flex;
  flex-direction: column;
  padding: 21px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #526057;
  background: rgba(255, 255, 248, 0.55);
  font-size: 0.58rem;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-featured {
  background: #e8dfb9;
  color: #6c5c26;
}

.badge-confidence {
  background: #dfe5d3;
  color: #4c624e;
}

.tag {
  min-height: 21px;
  padding: 3px 7px;
  color: #657168;
  background: transparent;
  font-size: 0.55rem;
  font-weight: 650;
  text-transform: none;
}

.catalog-card h2 {
  margin: 0;
  font: 400 1.58rem Georgia, serif;
  letter-spacing: -0.035em;
}

.subtitle {
  min-height: 1.2em;
  margin: 6px 0 0;
  color: #5f6962;
  font: italic 0.79rem Georgia, serif;
}

.summary {
  margin: 18px 0 0;
  color: #4f5c53;
  font-size: 0.74rem;
  line-height: 1.64;
}

.details {
  display: grid;
  gap: 0;
  margin: 18px 0 0;
}

.details div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.details dt {
  color: #758078;
  font-size: 0.61rem;
}

.details dd {
  margin: 0;
  color: #425046;
  font-size: 0.63rem;
  text-align: right;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 17px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 22px;
}

.action {
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #3f5943;
  background: rgba(255, 255, 249, 0.56);
  font-size: 0.66rem;
  font-weight: 730;
  text-decoration: none;
}

.action.primary {
  border-color: #466b4a;
  background: #466b4a;
  color: #f8f6ed;
}

.coming {
  color: #788079;
  font-size: 0.65rem;
  font-style: italic;
}

.empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 70px 20px;
  border: 1px dashed var(--line);
  border-radius: 22px;
  color: #687269;
  text-align: center;
}

.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(18px, 5vw, 76px) 42px;
  border-top: 1px solid var(--line);
  color: #6b756d;
  font-size: 0.67rem;
}

.page-footer a {
  color: #456248;
}

@media (max-width: 1100px) {
  .catalog-card,
  .catalog-card.featured {
    grid-column: span 6;
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: 15px 16px;
  }

  .site-nav a:first-child {
    display: none;
  }

  .hero {
    display: block;
    padding: 42px 18px 28px;
  }

  .hero-copy {
    margin-top: 24px;
  }

  .filters {
    grid-template-columns: 1fr;
    margin: 0 10px 18px;
  }

  .clear[hidden] {
    display: none;
  }

  .catalog-meta {
    display: block;
    margin: 0 18px 18px;
  }

  .catalog-meta p:last-child {
    margin-top: 5px;
  }

  .catalog-grid {
    display: block;
    padding: 0 10px 38px;
  }

  .catalog-card,
  .catalog-card.featured {
    grid-template-rows: 205px 1fr;
    margin-top: 13px;
    border-radius: 20px;
  }

  .page-footer {
    display: block;
    padding: 20px 18px 34px;
  }

  .page-footer span {
    display: block;
    margin-top: 7px;
  }
}

@media (max-width: 420px) {
  .site-nav a:nth-child(2) {
    display: none;
  }
}
