:root {
  --bg: #f8f6f0;
  --panel: #fffdf7;
  --ink: #112119;
  --muted: #4f5a54;
  --line: #d9d2c0;
  --accent: #e4552d;
  --accent-dark: #b43c1b;
  --chip: #ebe4d2;
  --ok: #1f7a4d;
  --radius: 20px;
  --shadow: 0 14px 40px rgba(27, 31, 21, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'IBM Plex Sans', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% -10%, #ffd9bf 0%, transparent 34%),
    radial-gradient(circle at 88% -10%, #bde7d5 0%, transparent 28%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.45;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(70px);
  pointer-events: none;
  opacity: 0.28;
  z-index: 0;
}

.orb-1 {
  width: 340px;
  height: 340px;
  background: #ffa16c;
  top: 24%;
  left: -120px;
}

.orb-2 {
  width: 360px;
  height: 360px;
  background: #77c9a2;
  right: -130px;
  top: 52%;
}

.topbar,
main,
.footer {
  position: relative;
  z-index: 1;
}

.topbar {
  max-width: 1120px;
  margin: 20px auto 0;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 253, 246, 0.9);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.brand {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand span {
  color: var(--accent);
  margin-left: 4px;
}

.topnav {
  display: flex;
  gap: 18px;
}

.topnav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

main {
  max-width: 1120px;
  margin: 26px auto 48px;
  padding: 0 14px;
}

.hero {
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(130deg, rgba(255, 222, 195, 0.45), rgba(190, 234, 214, 0.42));
  animation: rise 450ms ease-out;
}

.kicker {
  margin: 0;
  text-transform: uppercase;
  font-size: 0.73rem;
  letter-spacing: 0.13em;
  color: var(--accent-dark);
  font-weight: 700;
}

.hero h1 {
  margin: 10px 0 10px;
  font-family: 'Sora', sans-serif;
  line-height: 1.1;
  font-size: clamp(1.9rem, 4vw, 3.5rem);
}

.subtitle {
  margin: 0;
  max-width: 700px;
  color: var(--muted);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.hero-metrics article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.hero-metrics strong {
  font-family: 'Sora', sans-serif;
  font-size: 1.4rem;
  display: block;
}

.hero-metrics span {
  color: var(--muted);
  font-size: 0.95rem;
}

section {
  margin-top: 24px;
}

section h2 {
  font-family: 'Sora', sans-serif;
  margin: 0 0 14px;
}

.featured-grid,
.download-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
  animation: rise 450ms ease-out;
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

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

.pill {
  background: var(--chip);
  border: 1px solid #d2cab5;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.desc {
  color: var(--muted);
  margin: 0 0 14px;
  font-size: 0.95rem;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.rating {
  color: var(--ok);
  font-weight: 700;
  font-size: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 11px;
  padding: 10px 14px;
  text-decoration: none;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  transition: transform 120ms ease, filter 120ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.catalog {
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.92);
}

.catalog-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.controls {
  display: flex;
  gap: 8px;
}

input,
select {
  border: 1px solid #c8bfa8;
  border-radius: 11px;
  padding: 10px 12px;
  background: #fffefb;
  font: inherit;
}

input {
  min-width: 260px;
}

.chips {
  margin: 14px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.catalog-meta {
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.chip {
  border: 1px solid #ccbea0;
  border-radius: 999px;
  background: #f5eddc;
  color: #3f453b;
  padding: 6px 12px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.chip[aria-selected='true'] {
  background: #233529;
  color: #fff;
  border-color: #233529;
}

.pager {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.pager-btn {
  border: 1px solid #ccbea0;
  border-radius: 10px;
  background: #f5eddc;
  color: #3f453b;
  padding: 7px 12px;
  font-weight: 700;
  cursor: pointer;
}

.pager-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.page-label {
  color: var(--muted);
  font-weight: 600;
  min-width: 92px;
  text-align: center;
}

.faq {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

details {
  border-top: 1px solid #e5decb;
  padding: 12px 0;
}

details:first-of-type {
  border-top: 0;
}

summary {
  cursor: pointer;
  font-weight: 700;
}

.footer {
  text-align: center;
  color: var(--muted);
  margin: 0 auto 24px;
}

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

@media (max-width: 980px) {
  .featured-grid,
  .download-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    border-radius: 16px;
    flex-direction: column;
    gap: 8px;
  }

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

@media (max-width: 680px) {
  .hero {
    padding: 20px;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .controls {
    width: 100%;
    flex-direction: column;
  }

  input {
    min-width: 0;
    width: 100%;
  }

  select {
    width: 100%;
  }

  .featured-grid,
  .download-grid {
    grid-template-columns: 1fr;
  }
}
