:root {
  --antique: #ffeedd;
  --deep: #3b246f;
  --violet: #5d43c7;
  --ink: #2c1b55;
  --soft-text: rgba(44, 27, 85, 0.72);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 16%, rgba(93, 67, 199, 0.18), transparent 28rem),
    linear-gradient(135deg, rgba(255, 238, 221, 0.98), rgba(248, 247, 255, 0.92));
  font-family: Inter, Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.library-page {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) 0;
}

.library-hero {
  display: grid;
  min-height: 38svh;
  align-items: end;
  padding-bottom: clamp(28px, 5vw, 54px);
}

.library-kicker {
  margin: 0 0 14px;
  color: var(--violet);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.library-hero h1 {
  max-width: 820px;
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(46px, 8vw, 92px);
  line-height: 0.96;
  letter-spacing: 0;
}

.library-hero p:last-child {
  max-width: 700px;
  margin: 24px 0 0;
  color: var(--soft-text);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.5;
}

.block-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.block-card {
  display: grid;
  gap: 16px;
  min-height: 220px;
  padding: 24px;
  border: 1px solid rgba(59, 36, 111, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 238, 221, 0.8), rgba(248, 247, 255, 0.92)),
    #f8f7ff;
  box-shadow: 0 22px 60px rgba(59, 36, 111, 0.1);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.block-card:hover {
  transform: translateY(-4px);
  border-color: rgba(93, 67, 199, 0.34);
  box-shadow: 0 30px 76px rgba(59, 36, 111, 0.16);
}

.block-card__tag {
  width: max-content;
  color: var(--violet);
  font-size: 14px;
  font-weight: 800;
}

.block-card strong {
  align-self: end;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
}

.block-card span:last-child {
  color: var(--soft-text);
  line-height: 1.45;
}

@media (max-width: 680px) {
  .library-page {
    width: min(100% - 28px, 1120px);
    padding-top: 36px;
  }
}
