:root {
  --site-bg: #f6f1e8;
  --site-paper: #fffaf3;
  --site-text: #1b1630;
  --site-muted: #5d5967;
  --site-accent: #ff2d6f;
  --site-accent-dark: #e91d60;
  --site-shadow: 0 22px 70px rgba(29, 16, 47, 0.12);
  --site-border: rgba(27, 22, 48, 0.08);
  --container: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--site-text);
  background: linear-gradient(180deg, #f8f3eb 0%, #f4eee5 100%);
}

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

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 45, 111, 0.1);
  color: var(--site-accent-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button--primary {
  background: var(--site-accent);
  color: #fff;
  box-shadow: 0 14px 35px rgba(255, 45, 111, 0.26);
}

.button--ghost {
  border: 1px solid var(--site-border);
  background: rgba(255,255,255,0.64);
}

.templates-home {
  padding: 72px 0;
}

.templates-home__header {
  max-width: 860px;
  margin-bottom: 36px;
}

.templates-home__header h1 {
  margin: 18px 0 16px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.templates-home__header p {
  margin: 0;
  max-width: 720px;
  font-size: 20px;
  line-height: 1.65;
  color: var(--site-muted);
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.template-card {
  grid-column: span 6;
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--site-border);
  border-radius: 32px;
  box-shadow: var(--site-shadow);
  padding: 32px;
}

.template-card__meta {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--site-accent-dark);
  margin-bottom: 14px;
}

.template-card h2 {
  margin: 0 0 12px;
  font-size: 32px;
  letter-spacing: -0.04em;
}

.template-card p {
  margin: 0;
  font-size: 17px;
  line-height: 1.75;
  color: var(--site-muted);
}

.template-card__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

@media (max-width: 900px) {
  .template-card { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .container {
    width: min(var(--container), calc(100% - 28px));
  }

  .templates-home {
    padding: 42px 0 52px;
  }

  .templates-home__header p {
    font-size: 17px;
  }
}
