:root {
  --muted: #465f75;
}

/* Slightly stronger small-copy contrast across the marketing homepage. */
.hero p,
.heading p,
.feature p,
.template-card p,
.price small {
  color: #465f75;
}

.side span,
.metric small,
.template-meta {
  color: #506b82;
}

.template-showcase {
  background: var(--pale);
  scroll-margin-top: 74px;
}

.template-showcase + .pricing {
  background: #fff;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.template-card {
  overflow: hidden;
  border: 1px solid #d8e4ed;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(16, 42, 67, .07);
  transition: transform .2s, box-shadow .2s;
}

.template-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 44px rgba(16, 42, 67, .13);
}

.template-preview {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: #dce7ef;
}

.template-preview::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(8, 29, 46, .7));
  content: "";
  opacity: 0;
  transition: opacity .2s;
}

.template-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}

.template-image-food {
  object-position: 62% center;
}

.template-image-fireworks {
  object-position: center 58%;
}

.template-image-fashion {
  object-position: 70% center;
}

.template-image-jewelry {
  object-position: center center;
}

.template-card:hover .template-preview img {
  transform: scale(1.035);
}

.template-card:hover .template-preview::after,
.template-card:hover .template-view {
  opacity: 1;
}

.template-view {
  position: absolute;
  z-index: 1;
  right: 16px;
  bottom: 14px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 8px;
  color: #fff;
  background: rgba(16, 42, 67, .78);
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  transition: opacity .2s;
}

.template-card-body {
  padding: 20px;
}

.template-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #617a8f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.template-tier {
  padding: 4px 7px;
  border-radius: 999px;
  color: #70520a;
  background: #fff3cb;
  font-size: 9px;
}

.template-tier-common {
  color: #176b4e;
  background: #e5f7ef;
}

.template-card h3 {
  margin: 10px 0 6px;
  color: var(--navy);
  font-size: 21px;
}

.template-card p {
  min-height: 63px;
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.template-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 18px;
}

.template-actions .btn {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 12px;
}

.template-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 30px;
  padding: 22px 24px;
  border: 1px solid #d3e1eb;
  border-radius: 15px;
  background: #fff;
}

.template-cta p {
  margin: 0;
  color: #476176;
  font-size: 14px;
  font-weight: 700;
}

.template-cta .btn {
  flex: none;
}

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

@media (max-width: 600px) {
  .template-grid {
    grid-template-columns: 1fr;
  }

  .template-card p {
    min-height: 0;
  }

  .template-cta {
    align-items: stretch;
    flex-direction: column;
  }
}
