/* ===================================================
   The Payment Stack — blog.paying.co
   Ghost theme stylesheet
   =================================================== */

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: #f3f4f6;
  color: #0b1d3a;
  font-family: 'DM Sans', -apple-system, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: #0d9388; }

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

/* ===================================================
   Site header
   =================================================== */
.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: #0b1d3a;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}
.site-header__nav a:hover { color: #0d9388; }

/* On article pages, header sits over white not gradient */
.is-post .site-header,
.is-page .site-header {
  position: relative;
  background: #ffffff;
  border-bottom: 1px solid #e4e9f0;
}

/* ===================================================
   Hero (home, tag, author archives)
   =================================================== */
.ph-hero {
  position: relative;
  padding: 120px 24px 100px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 90% 12%, rgba(167,233,221,0.50) 0%, transparent 55%),
    radial-gradient(ellipse at 5% 80%, rgba(255,230,212,0.45) 0%, transparent 55%),
    linear-gradient(180deg, #fefcf9 0%, #f5f7f6 100%);
  text-align: center;
}
.ph-hero::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13,147,136,0.10), transparent 70%);
  pointer-events: none;
}
.ph-hero::after {
  content: '';
  position: absolute;
  bottom: -120px; left: -160px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167,233,221,0.30), transparent 70%);
  pointer-events: none;
}
.ph-hero__inner {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  z-index: 1;
}
.ph-eyebrow {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 16px;
  color: #0d9388;
  margin: 0 0 16px;
}
.ph-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: 38px;
  line-height: 1.1;
  color: #0b1d3a;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}
.ph-headline em {
  font-style: italic;
  color: #0d9388;
}
.ph-lede {
  font-size: 16px;
  line-height: 1.55;
  color: #5b6b82;
  max-width: 600px;
  margin: 0 auto;
}

@media (min-width: 720px) {
  .ph-headline { font-size: 56px; }
  .ph-lede { font-size: 17px; }
}

/* ===================================================
   Post grid
   =================================================== */
.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
   =================================================== */
.post-card {
  background: #ffffff;
  border: 1px solid #e4e9f0;
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(11,29,58,.04), 0 20px 50px rgba(11,29,58,.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(11,29,58,.04), 0 30px 60px rgba(11,29,58,.14);
  border-color: rgba(13,147,136,.3);
}

@media (min-width: 720px) {
  .post-card { margin-bottom: 0; }
}

.post-card__media {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #d9f0ec, #ecf7f4);
  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: #0a7a72;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.5;
}

@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: #0d9388;
  margin-bottom: 12px;
}

.post-card__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  color: #0b1d3a;
}

.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: #ecf7f4;
  border: 1px solid rgba(13,147,136,.18);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: #0a7a72;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.post-card__pill:hover {
  background: #d9f0ec;
  border-color: rgba(13,147,136,.35);
}

.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, #0d9388, #0a7a72);
  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: #0b1d3a; }
.post-card__dot { opacity: 0.4; margin: 0 8px; }

/* Featured card spans full grid width on larger screens */
@media (min-width: 720px) {
  .post-card--featured { grid-column: 1 / -1; }
}

/* ===================================================
   Single post / page
   =================================================== */
.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: #0d9388;
  margin-bottom: 16px;
}
.article__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #0b1d3a;
  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, #0d9388, #0a7a72);
  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: #0b1d3a; }

@media (min-width: 720px) {
  .article__title { font-size: 48px; }
}

.article__feature-image {
  margin: 0 -24px 48px;
  border-radius: 0;
  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 body content */
.article__content {
  font-size: 17px;
  line-height: 1.7;
  color: #1a2b4a;
}
.article__content h1,
.article__content h2,
.article__content h3,
.article__content h4 {
  font-family: 'Playfair Display', Georgia, serif;
  color: #0b1d3a;
  letter-spacing: -0.01em;
  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: #0d9388;
  text-decoration: underline;
  text-decoration-color: rgba(13,147,136,0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}
.article__content a:hover { text-decoration-color: #0d9388; }
.article__content blockquote {
  margin: 1.8em 0;
  padding: 16px 20px;
  background: #ecf7f4;
  border-left: 3px solid #0d9388;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #1a2b4a;
}
.article__content code {
  background: #f3f4f6;
  border: 1px solid #e4e9f0;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 14px;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  color: #0a7a72;
}
.article__content pre {
  background: #0b1d3a;
  color: #ecf7f4;
  padding: 20px;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
  margin: 1.8em 0;
}
.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;
}

/* Koenig editor width classes — wide and full-bleed images/cards */
.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;
  }
}

/* Koenig image card */
.kg-image-card { margin: 1.8em 0; }
.kg-image { display: block; margin: 0 auto; }

/* Koenig gallery card */
.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;
}

/* Koenig bookmark card */
.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(13,147,136,.35); }
.kg-bookmark-container {
  display: flex;
  width: 100%;
  text-decoration: none;
  color: inherit;
}
.kg-bookmark-content {
  flex: 1;
  padding: 20px;
}
.kg-bookmark-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  color: #0b1d3a;
  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; }
}

/* Koenig callout card */
.kg-callout-card {
  margin: 1.8em 0;
  padding: 16px 20px;
  border-radius: 12px;
  background: #ecf7f4;
  border: 1px solid rgba(13,147,136,.2);
  display: flex;
  gap: 12px;
}
.kg-callout-emoji { font-size: 20px; flex-shrink: 0; }
.kg-callout-text { color: #1a2b4a; line-height: 1.5; }

/* Koenig button card */
.kg-button-card {
  margin: 1.8em 0;
  text-align: center;
}
.kg-button-card a {
  display: inline-block;
  padding: 12px 24px;
  background: #0b1d3a;
  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: #1a2b4a;
  transform: translateY(-1px);
}
.article__content ul,
.article__content ol { margin: 0 0 1.4em; padding-left: 1.5em; }
.article__content li { margin-bottom: 0.4em; }
.article__content hr {
  border: 0;
  border-top: 1px solid #e4e9f0;
  margin: 3em 0;
}

/* Article footer — tags + author */
.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
   =================================================== */
.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: #0b1d3a;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.pagination a:hover {
  border-color: rgba(13,147,136,.35);
  transform: translateY(-1px);
}
.pagination__page {
  color: #5b6b82;
}

/* ===================================================
   Site footer
   =================================================== */
.site-footer {
  background: #0b1d3a;
  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: 'Playfair Display', Georgia, 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 (tag / author) hero is smaller
   =================================================== */
.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 / member CTA
   =================================================== */
.subscribe {
  max-width: 760px;
  margin: 48px auto;
  padding: 40px 24px;
  background: linear-gradient(135deg, #ecf7f4 0%, #d9f0ec 100%);
  border: 1px solid rgba(13,147,136,.18);
  border-radius: 20px;
  text-align: center;
}
.subscribe__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  color: #0b1d3a;
  margin: 0 0 8px;
}
.subscribe__lede {
  color: #5b6b82;
  font-size: 15px;
  margin: 0 0 20px;
}
.subscribe__btn {
  display: inline-block;
  padding: 12px 24px;
  background: #0b1d3a;
  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: #1a2b4a;
  transform: translateY(-1px);
}
