:root {
  --violet: #360a56;
  --ink: #2b2240;
  --muted: #5a4a70;
  --card-bg: #ffffff;
  --bg: #f4f3f8;
  --shadow: 0 6px 18px rgba(27, 16, 48, 0.12);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  background: radial-gradient(1200px 600px at 50% -10%, #ffffff 0%, var(--bg) 60%);
  color: var(--ink);
  padding: clamp(16px, 3vw, 32px);
  letter-spacing: .02em;
  line-height: 1.5;
  font-size: 16px;
}

header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.main-title {
  font-size: clamp(28px, 4vw, 40px);
  color: #360a56;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
}

.subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: #5a4a70;
  margin-top: 0.5rem;
  letter-spacing: 0.05em;
}

#cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(16px, 2.5vw, 28px);
  max-width: min(1200px, 92vw);
  margin: 0 auto;
  align-items: stretch;
  justify-items: center;
}

article {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 360px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(54, 10, 86, .06);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}

article:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(27, 16, 48, .18);
}

article img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

article h3 {
  margin: 14px 16px 6px;
  font-size: clamp(18px, 2.4vw, 20px);
  color: var(--violet);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .08em;
}

article p {
  margin: 0 16px 18px;
  color: var(--muted);
  font-size: clamp(14px, 2vw, 15px);
  letter-spacing: .02em;
  text-transform: none;
}

.card-btn {
  margin: 12px auto 4px;
  display: block;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  background: #360a56;
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.card-btn:hover {
  background: #502070;
  transform: scale(1.05);
}

.main-title,
.subtitle,
article img,
.card-btn {
  user-select: none;
}

@media (max-width: 640px) {
  #cards {
    grid-template-columns: 1fr;
    max-width: 560px;
  }

  article {
    max-width: 100%;
  }
}