/* ===================================================
   The Payment Stack — blog.paying.co
   Paying.co teal/dark palette, constellation hero
   =================================================== */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #fafaf9;
  color: #0e1528;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: #14a296; }
img { max-width: 100%; height: auto; display: block; }

.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
}
.site-header__brand { display: inline-flex; align-items: center; text-decoration: none; }
.site-header__brand img {
  height: 64px; width: auto; max-width: 280px;
  display: block; object-fit: contain;
}
.site-header__nav { display: flex; gap: 24px; }
.site-header__nav ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 24px; align-items: center;
}
.site-header__nav li { list-style: none; margin: 0; padding: 0; }
.site-header__nav a {
  color: #0e1528; text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: color 0.2s ease;
}
.site-header__nav a:hover { color: #14a296; }

.is-post .site-header,
.is-page .site-header {
  position: relative;
  background: #ffffff;
  border-bottom: 1px solid #e4e9f0;
}

/* Hero */
.ph-hero {
  position: relative;
  padding: 140px 24px 100px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 90% 80%, rgba(167, 233, 221, 0.45) 0%, transparent 55%),
    radial-gradient(ellipse at 5% 20%, rgba(232, 240, 235, 0.55) 0%, transparent 50%),
    linear-gradient(180deg, #fefefe 0%, #f3f7f5 100%);
  text-align: center;
}
.ph-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 12% 25%, #b8d4ce 1.5px, transparent 2px),
    radial-gradient(circle at 28% 60%, #b8d4ce 1.5px, transparent 2px),
    radial-gradient(circle at 45% 18%, #b8d4ce 2px, transparent 2.5px),
    radial-gradient(circle at 62% 72%, #b8d4ce 1.5px, transparent 2px),
    radial-gradient(circle at 78% 32%, #b8d4ce 2px, transparent 2.5px),
    radial-gradient(circle at 88% 65%, #b8d4ce 1.5px, transparent 2px),
    radial-gradient(circle at 38% 88%, #b8d4ce 1.5px, transparent 2px),
    radial-gradient(circle at 70% 12%, #b8d4ce 1.5px, transparent 2px);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  opacity: 0.8;
  pointer-events: none;
}
.ph-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'><g stroke='%23b8d4ce' stroke-width='0.15' fill='none' opacity='0.7'><line x1='12' y1='25' x2='28' y2='60'/><line x1='28' y1='60' x2='45' y2='18'/><line x1='45' y1='18' x2='70' y2='12'/><line x1='45' y1='18' x2='62' y2='72'/><line x1='62' y1='72' x2='78' y2='32'/><line x1='78' y1='32' x2='88' y2='65'/><line x1='62' y1='72' x2='38' y2='88'/><line x1='70' y1='12' x2='78' y2='32'/></g></svg>");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
}
.ph-hero__inner {
  position: relative; max-width: 860px;
  margin: 0 auto; z-index: 1;
}
.ph-eyebrow {
  font-family: 'Poppins', sans-serif;
  font-style: italic; font-weight: 400; font-size: 16px;
  color: #14a296; margin: 0 0 18px; letter-spacing: 0.01em;
}
.ph-headline {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: clamp(46px, 6vw, 72px);
  line-height: 1.02; color: #0e1528;
  margin: 0 0 24px; letter-spacing: -0.025em;
}
.ph-headline em { font-style: normal; font-weight: 700; color: #14a296; }
.ph-lede {
  font-size: 17px; line-height: 1.55; color: #5b6b82;
  max-width: 680px; margin: 0 auto;
}

.post-feed {
  max-width: 1120px; margin: -40px auto 80px;
  padding: 0 16px; position: relative; z-index: 2;
}
@media (min-width: 720px) {
  .post-feed { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; padding: 0 24px; }
}
@media (min-width: 1024px) {
  .post-feed { grid-template-columns: repeat(3, 1fr); }
}

.post-card {
  background: #ffffff;
  border: 1px solid #e4e9f0;
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(14,21,40,.04), 0 20px 50px rgba(14,21,40,.10);
  overflow: hidden; margin-bottom: 24px;
  display: block; text-decoration: none; color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 1px 2px rgba(14,21,40,.04), 0 30px 60px rgba(14,21,40,.14);
  border-color: rgba(20, 162, 150, 0.35);
}
@media (min-width: 720px) { .post-card { margin-bottom: 0; } }

.post-card__media {
  width: 100%; height: 180px;
  background: linear-gradient(135deg, #d9efe9, #ecf5f1);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__media-placeholder {
  color: #14a296; font-size: 12px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.55;
}
@media (min-width: 720px) { .post-card__media { height: 220px; } }

.post-card__body { padding: 24px; background: #ffffff; }
.post-card__tag {
  display: inline-block; font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: #14a296; margin-bottom: 12px;
}
.post-card__title {
  font-family: 'Poppins', sans-serif; font-weight: 600;
  font-size: 22px; line-height: 1.2; letter-spacing: -0.02em;
  margin: 0 0 12px; color: #0e1528;
}
.post-card__excerpt {
  color: #5b6b82; font-size: 15px; line-height: 1.55; margin: 0 0 18px;
}
.post-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.post-card__pill {
  display: inline-block; padding: 5px 12px;
  background: #ecf5f1;
  border: 1px solid rgba(20, 162, 150, 0.20);
  border-radius: 999px;
  font-size: 11px; font-weight: 500; color: #1b8e89;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.post-card__pill:hover {
  background: #d9efe9;
  border-color: rgba(20, 162, 150, 0.40);
}
.post-card__meta {
  display: flex; align-items: center;
  font-size: 13px; color: #5b6b82;
  padding-top: 16px; border-top: 1px solid #e4e9f0;
}
.post-card__avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, #14a296, #0d8077);
  color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 10px;
  margin-right: 10px; flex-shrink: 0; overflow: hidden;
}
.post-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-card__author { font-weight: 500; color: #0e1528; }
.post-card__dot { opacity: 0.4; margin: 0 8px; }
@media (min-width: 720px) {
  .post-card--featured { grid-column: 1 / -1; }
}

.article { max-width: 760px; margin: 0 auto; padding: 64px 24px 80px; }
.article__header { margin-bottom: 48px; text-align: center; }
.article__primary-tag {
  display: inline-block; font-size: 12px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: #14a296; margin-bottom: 16px;
}
.article__title {
  font-family: 'Poppins', sans-serif; font-weight: 600;
  font-size: 36px; line-height: 1.1; letter-spacing: -0.025em;
  color: #0e1528; margin: 0 0 20px;
}
.article__excerpt { font-size: 18px; line-height: 1.55; color: #5b6b82; margin: 0 0 32px; }
.article__meta {
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #5b6b82;
}
.article__avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #14a296, #0d8077);
  color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
  margin-right: 12px; overflow: hidden;
}
.article__avatar img { width: 100%; height: 100%; object-fit: cover; }
.article__author { font-weight: 500; color: #0e1528; }
@media (min-width: 720px) { .article__title { font-size: 48px; } }

.article__feature-image { margin: 0 -24px 48px; overflow: hidden; }
.article__feature-image img { width: 100%; height: auto; display: block; }
@media (min-width: 720px) {
  .article__feature-image {
    margin-left: -60px; margin-right: -60px;
    border-radius: 16px;
  }
}

.article__content { font-size: 17px; line-height: 1.7; color: #1a2b2a; }
.article__content h1,
.article__content h2,
.article__content h3,
.article__content h4 {
  font-family: 'Poppins', sans-serif; color: #0e1528;
  letter-spacing: -0.02em; margin-top: 2em; margin-bottom: 0.6em; line-height: 1.25;
}
.article__content h2 { font-size: 28px; font-weight: 600; }
.article__content h3 { font-size: 22px; font-weight: 600; }
.article__content p { margin: 0 0 1.4em; }
.article__content a {
  color: #14a296; text-decoration: underline;
  text-decoration-color: rgba(20, 162, 150, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}
.article__content a:hover { text-decoration-color: #14a296; }
.article__content blockquote {
  margin: 1.8em 0; padding: 16px 20px;
  background: #ecf5f1;
  border-left: 3px solid #14a296;
  border-radius: 0 8px 8px 0;
  font-style: italic; color: #1a2b2a;
}
.article__content code {
  background: #f3f4f6; border: 1px solid #e4e9f0;
  border-radius: 4px; padding: 2px 6px;
  font-size: 14px;
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
  color: #14a296;
}
.article__content pre {
  background: #0e1528; color: #ecf5f1;
  padding: 20px; border-radius: 12px;
  overflow-x: auto; font-size: 14px; line-height: 1.6;
  margin: 1.8em 0; font-family: 'JetBrains Mono', monospace;
}
.article__content pre code { background: none; border: none; color: inherit; padding: 0; font-size: inherit; }
.article__content img, .article__content figure {
  margin: 1.8em 0; border-radius: 12px; overflow: hidden;
}
.article__content figcaption {
  text-align: center; font-size: 14px; color: #5b6b82; margin-top: 8px;
}

.article__content .kg-width-wide,
.article__content figure.kg-width-wide {
  position: relative; width: 85vw; max-width: 1040px;
  left: 50%; transform: translateX(-50%);
}
.article__content .kg-width-full,
.article__content figure.kg-width-full {
  position: relative; width: 100vw;
  left: 50%; transform: translateX(-50%);
  border-radius: 0;
}
.article__content .kg-width-full img { width: 100%; border-radius: 0; }
@media (max-width: 720px) {
  .article__content .kg-width-wide,
  .article__content .kg-width-full {
    width: 100%; left: 0; transform: none;
  }
}
.kg-image-card { margin: 1.8em 0; }
.kg-image { display: block; margin: 0 auto; }
.kg-gallery-container { display: flex; flex-direction: column; gap: 12px; margin: 1.8em 0; }
.kg-gallery-row { display: flex; gap: 12px; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.kg-bookmark-card {
  margin: 1.8em 0; border: 1px solid #e4e9f0;
  border-radius: 12px; overflow: hidden;
  display: flex; background: #ffffff;
  transition: border-color 0.2s ease;
}
.kg-bookmark-card:hover { border-color: rgba(20, 162, 150, 0.40); }
.kg-bookmark-container { display: flex; width: 100%; text-decoration: none; color: inherit; }
.kg-bookmark-content { flex: 1; padding: 20px; }
.kg-bookmark-title { font-family: 'Poppins', sans-serif; font-weight: 600; color: #0e1528; margin-bottom: 6px; }
.kg-bookmark-description { font-size: 14px; color: #5b6b82; line-height: 1.5; margin-bottom: 12px; }
.kg-bookmark-metadata { font-size: 13px; color: #5b6b82; display: flex; align-items: center; gap: 8px; }
.kg-bookmark-thumbnail img { width: 160px; height: 100%; object-fit: cover; }
@media (max-width: 540px) {
  .kg-bookmark-container { flex-direction: column-reverse; }
  .kg-bookmark-thumbnail img { width: 100%; height: 180px; }
}
.kg-callout-card {
  margin: 1.8em 0; padding: 16px 20px; border-radius: 12px;
  background: #ecf5f1; border: 1px solid rgba(20, 162, 150, 0.2);
  display: flex; gap: 12px;
}
.kg-callout-emoji { font-size: 20px; flex-shrink: 0; }
.kg-callout-text { color: #1a2b2a; line-height: 1.5; }
.kg-button-card { margin: 1.8em 0; text-align: center; }
.kg-button-card a {
  display: inline-block; padding: 12px 24px;
  background: #0e1528; color: #ffffff;
  border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: 14px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.kg-button-card a:hover { background: #1a2b2a; transform: translateY(-1px); }

.article__footer { max-width: 760px; margin: 48px auto 0; padding: 32px 0; border-top: 1px solid #e4e9f0; }
.article__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }

.pagination {
  max-width: 1120px; margin: 0 auto 80px; padding: 0 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px;
}
.pagination a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px;
  background: #ffffff;
  border: 1px solid #e4e9f0;
  border-radius: 999px;
  color: #0e1528; font-weight: 500; text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.pagination a:hover { border-color: rgba(20, 162, 150, 0.40); transform: translateY(-1px); }
.pagination__page { color: #5b6b82; }

.site-footer { background: #0e1528; color: rgba(255,255,255,0.7); padding: 48px 24px; }
.site-footer__inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; flex-direction: column;
  gap: 24px; align-items: center; text-align: center;
}
.site-footer__brand { font-family: 'Poppins', sans-serif; font-size: 20px; color: #ffffff; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; align-items: center; }
.site-footer__nav ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 24px; align-items: center;
}
.site-footer__nav li { list-style: none; margin: 0; padding: 0; }
.site-footer__nav a {
  color: rgba(255,255,255,0.7); text-decoration: none;
  font-size: 14px; transition: color 0.2s ease;
}
.site-footer__nav a:hover { color: #5eead4; }
.site-footer__copy { font-size: 13px; color: rgba(255,255,255,0.5); }
@media (min-width: 720px) {
  .site-footer__inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

.archive-hero { padding: 100px 24px 60px; }
.archive-hero .ph-headline { font-size: 36px; }
@media (min-width: 720px) { .archive-hero .ph-headline { font-size: 44px; } }

.subscribe {
  max-width: 760px; margin: 48px auto;
  padding: 40px 24px;
  background: linear-gradient(135deg, #ecf5f1 0%, #d9efe9 100%);
  border: 1px solid rgba(20, 162, 150, 0.2);
  border-radius: 20px; text-align: center;
}
.subscribe__title { font-family: 'Poppins', sans-serif; font-size: 24px; color: #0e1528; margin: 0 0 8px; }
.subscribe__lede { color: #5b6b82; font-size: 15px; margin: 0 0 20px; }
.subscribe__btn {
  display: inline-block; padding: 12px 24px;
  background: #0e1528; color: #ffffff;
  border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: 14px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.subscribe__btn:hover { background: #1a2b2a; transform: translateY(-1px); }
