/* Blog + SEO section pages, Signal Pop edition. Sits on presence.css's tokens
   and never redefines them. Covers keep their campaign colors in both themes,
   like the landing's creatives; paper, text and lines follow the theme. */

.blog-main {
  padding: 0;
}
.blog-index {
  padding-block: 44px 96px;
}
.blog-breadcrumb {
  font-size: 13.5px;
  color: var(--muted);
}
.blog-breadcrumb a:hover {
  color: var(--purple);
}

/* ---- Index head: headline left, lede tucked to the right like the landing hero ---- */

.index-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 24px 48px;
  align-items: end;
  margin: 18px 0 52px;
}
.index-head h1 {
  font: 800 clamp(46px, 6.2vw, 86px) / 1.02 var(--display);
  letter-spacing: -0.035em;
  max-width: 12ch;
}
.index-head h1 span,
.blog-explore h2 span,
.article-cta h2 span {
  display: block;
}
.index-head h1 span {
  color: var(--purple);
}
.blog-lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--body);
  max-width: 44ch;
  padding-bottom: 10px;
}

/* ---- Covers: the generated thumbnail of every post ---- */

.cover {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  aspect-ratio: 4 / 3;
  padding: clamp(18px, 2.4vw, 28px);
  border-radius: 22px;
  background: var(--cover-bg);
  color: var(--cover-fg);
  transition: transform 0.28s var(--ease);
}
.cover-round {
  border-radius: 40px;
}
.cover-title {
  position: relative;
  z-index: 1;
  font: 800 clamp(22px, 2.1vw, 30px) / 1.06 var(--display);
  letter-spacing: -0.03em;
  color: inherit;
  text-wrap: balance;
  max-width: 16ch;
}
.cover-motif {
  position: absolute;
  top: -16%;
  right: -12%;
  width: 66%;
  height: auto;
  color: var(--cover-accent);
  transform: rotate(-9deg);
}
.cover-glyph {
  position: absolute;
  top: 9%;
  right: 8%;
  width: 40%;
  height: auto;
  color: var(--cover-accent);
  transform: rotate(-7deg);
}
.cover-monogram {
  position: absolute;
  top: 6%;
  left: 7%;
  font: 800 clamp(64px, 9vw, 128px) / 1 var(--display);
  letter-spacing: -0.05em;
  color: var(--cover-accent);
  transform: rotate(-6deg);
}
.cover-monogram + .cover-title {
  max-width: 14ch;
}

/* ---- Tiles ---- */

.tile-link {
  display: block;
  color: inherit;
}
.tile-link:hover .cover,
.tile-link:focus-visible .cover {
  transform: translateY(-6px) rotate(-1deg);
}
.tile-link:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 6px;
  border-radius: 24px;
}
.tile-caption {
  padding: 16px 6px 0;
}
.tile-caption p {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--body);
}
.tile-meta {
  margin-top: 6px !important;
  font-size: 13px !important;
  color: var(--muted) !important;
}
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 44px 28px;
}
.tile-featured {
  margin-bottom: 60px;
}
.tile-featured .tile-link {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 24px 40px;
  align-items: end;
}
.tile-featured .cover {
  aspect-ratio: 16 / 10;
  border-radius: 28px;
  padding: clamp(24px, 3vw, 40px);
}
.tile-featured .cover-title {
  font-size: clamp(30px, 3.8vw, 54px);
  max-width: 14ch;
}
.tile-featured .cover-motif {
  width: 54%;
  top: -18%;
  right: -8%;
}
.tile-featured .tile-caption {
  padding: 0 0 12px;
}
.tile-featured .tile-caption p {
  font-size: 19px;
}
.tile-featured .tile-meta {
  font-size: 14px !important;
  margin-top: 12px !important;
}
.tile-small .cover-title {
  font-size: 21px;
}
.blog-empty {
  color: var(--muted);
  padding: 40px 0;
}

/* Rhythm: every fifth tile after the second stretches wide on big screens. */
@media (min-width: 900px) {
  .tile-grid:not(.tile-grid-more) > .tile:nth-child(5n + 3) {
    grid-column: span 2;
  }
  .tile-grid:not(.tile-grid-more) > .tile:nth-child(5n + 3) .cover {
    aspect-ratio: 2 / 1;
  }
  .tile-grid:not(.tile-grid-more) > .tile:nth-child(5n + 3) .cover-title {
    font-size: clamp(26px, 2.6vw, 38px);
    max-width: 18ch;
  }
  .tile-grid:not(.tile-grid-more) > .tile:nth-child(5n + 3) .cover-motif {
    width: 42%;
    top: -30%;
  }
}

.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.blog-pagination a {
  font-weight: 700;
  color: var(--ink);
}
.blog-pagination a:hover {
  color: var(--purple);
}

/* ---- Explore band: the landing's yellow sticker world ---- */

.blog-explore {
  background: #ffe38a;
  color: #14121f;
  padding: clamp(56px, 7vw, 92px) 0;
}
.blog-explore h2 {
  font: 800 clamp(38px, 4.6vw, 64px) / 1.02 var(--display);
  letter-spacing: -0.035em;
  margin-bottom: 32px;
}
.blog-explore h2 span {
  color: #5b36cc;
}
.explore-stickers {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 16px;
}
.explore-sticker {
  --sticker-turn: -3deg;
  display: inline-flex;
  align-items: center;
  min-height: 60px;
  padding: 14px 26px;
  border: 2px solid #ffffff;
  border-radius: 20px;
  background: #fffdf7;
  color: #251b30;
  font-size: 17px;
  font-weight: 650;
  box-shadow: 0 6px 10px -6px #251b3066;
  transform: rotate(var(--sticker-turn));
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.explore-sticker:nth-child(2n) {
  --sticker-turn: 4deg;
}
.explore-sticker:nth-child(3n) {
  --sticker-turn: -1.5deg;
}
.explore-rss {
  background: #5b36cc;
  border-color: #5b36cc;
  color: #fff;
}
.explore-sticker:hover,
.explore-sticker:focus-visible {
  transform: translateY(-6px) rotate(0deg) scale(1.03);
  box-shadow: 0 12px 16px -9px #251b3070;
}

/* ---- Article hero: the post's own cover, full bleed ---- */

.article-hero {
  position: relative;
  overflow: hidden;
  background: var(--cover-bg);
  color: var(--cover-fg);
  padding: clamp(48px, 7vw, 96px) 0 clamp(44px, 5vw, 64px);
}
.article-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
}
.article-hero .blog-breadcrumb,
.article-hero .blog-breadcrumb a,
.article-hero .blog-byline {
  color: inherit;
}
.article-hero .blog-breadcrumb {
  opacity: 0.78;
  margin-bottom: 22px;
}
.article-hero h1 {
  font: 800 clamp(38px, 5.6vw, 76px) / 1.02 var(--display);
  letter-spacing: -0.035em;
  text-wrap: balance;
  max-width: 15ch;
}
.article-lede {
  margin-top: 22px;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.5;
  max-width: 52ch;
  opacity: 0.92;
}
.blog-byline {
  margin-top: 26px;
  font-size: 14.5px;
  opacity: 0.82;
}
.article-hero-art {
  position: absolute;
  top: -14%;
  right: -3%;
  width: clamp(260px, 34vw, 520px);
  color: var(--cover-accent);
  pointer-events: none;
}
.article-hero-art .cover-motif,
.article-hero-art .cover-glyph {
  position: static;
  width: 100%;
  transform: rotate(-9deg);
}
.article-hero-art .cover-monogram {
  position: static;
  display: block;
  font-size: clamp(120px, 18vw, 280px);
  text-align: right;
  padding-right: 8%;
}

/* ---- Article body ---- */

.blog-article {
  max-width: 68ch;
  margin: clamp(40px, 5vw, 64px) auto 0;
}
.blog-body {
  color: var(--body);
  font-size: 17.5px;
  line-height: 1.72;
}
.blog-body > * + * {
  margin-top: 1.25em;
}
.blog-body > p:first-child {
  font-size: 20px;
  line-height: 1.6;
  color: var(--ink);
}
.blog-body h2 {
  font: 800 clamp(26px, 2.8vw, 34px) / 1.12 var(--display);
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-top: 2.1em;
  scroll-margin-top: 100px;
}
.blog-body h3 {
  font: 700 21px / 1.25 var(--display);
  color: var(--ink);
  margin-top: 1.7em;
  scroll-margin-top: 100px;
}
.blog-body a {
  color: var(--purple);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.blog-body ul,
.blog-body ol {
  padding-left: 1.3em;
}
.blog-body li + li {
  margin-top: 0.45em;
}
.blog-body li::marker {
  color: var(--coral);
  font-weight: 700;
}
.blog-body blockquote {
  margin: 0;
  padding: 26px 28px 26px 30px;
  border-radius: 20px 20px 20px 4px;
  background: var(--purple-tint);
  color: var(--ink);
  font-size: 1.05em;
  font-weight: 500;
}
.blog-body blockquote p + p {
  margin-top: 0.8em;
}
.blog-body code {
  background: var(--wash);
  border-radius: 6px;
  padding: 0.15em 0.4em;
  font-size: 0.9em;
}
.blog-body pre {
  background: #171322;
  color: #f7f4ff;
  border-radius: 18px;
  padding: 22px 24px;
  overflow-x: auto;
}
.blog-body pre code {
  background: none;
  padding: 0;
  font-size: 0.86em;
}
.blog-body img {
  max-width: 100%;
  height: auto;
  border-radius: 18px;
}
.blog-body hr {
  border: none;
  border-top: 1px solid var(--line);
}
.blog-body .table-scroll,
.blog-body table {
  display: block;
  width: 100%;
  overflow-x: auto;
}
.blog-body table {
  border-collapse: collapse;
  font-size: 15px;
}
.blog-body th,
.blog-body td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.blog-body th {
  color: var(--muted);
  font-weight: 600;
}

.blog-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 44px 0 0;
  padding: 0;
}
.blog-tags a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 100px;
  background: var(--purple-tint);
  color: var(--purple);
  font-size: 14px;
  font-weight: 600;
}
.blog-tags a:hover {
  background: var(--purple);
  color: #fff;
}

/* ---- Closing CTA on saturated blurple, like the landing's ---- */

.article-cta {
  margin-top: clamp(64px, 8vw, 104px);
  background: #5b4dff;
  color: #fff;
  padding: clamp(56px, 7vw, 92px) 0;
}
.article-cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px 56px;
  align-items: center;
}
.article-cta h2 {
  font: 800 clamp(34px, 4.4vw, 60px) / 1.02 var(--display);
  letter-spacing: -0.035em;
}
.article-cta h2 span {
  color: #ffe38a;
}
.article-cta p {
  margin-top: 18px;
  font-size: 17px;
  line-height: 1.55;
  max-width: 44ch;
  opacity: 0.92;
}
.article-cta-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 240px;
}
.article-cta .button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 100px;
  background: #ffe38a;
  color: #14121f;
  font-weight: 700;
  font-size: 16px;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.article-cta .button:hover {
  background: #fff0b8;
  transform: translateY(-2px);
}
.article-cta .button.ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
}
.article-cta .button.ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}
.article-cta .button:focus-visible {
  outline: 3px solid #ffe38a;
  outline-offset: 4px;
}

.blog-more {
  padding: clamp(56px, 7vw, 88px) 0 clamp(72px, 8vw, 108px);
}
.blog-more h2 {
  font: 800 clamp(28px, 3vw, 40px) / 1.05 var(--display);
  letter-spacing: -0.03em;
  margin-bottom: 32px;
}
.tile-grid-more {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 32px 24px;
}

/* ---- Responsive ---- */

@media (max-width: 800px) {
  .index-head {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 40px;
  }
  .blog-lede {
    padding-bottom: 0;
  }
  .tile-featured .tile-link {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .tile-featured .cover {
    aspect-ratio: 4 / 3;
  }
  .tile-featured .tile-caption {
    padding: 16px 6px 0;
  }
  .tile-grid {
    gap: 36px 20px;
  }
  .article-hero-art {
    top: auto;
    bottom: -18%;
    right: -14%;
    width: 52vw;
    opacity: 0.85;
  }
  .article-hero-inner {
    padding-right: 12vw;
  }
  .article-cta-inner {
    grid-template-columns: 1fr;
  }
  .article-cta-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}
@media (max-width: 560px) {
  .cover {
    border-radius: 18px;
  }
  .cover-round {
    border-radius: 30px;
  }
  .tile-grid {
    grid-template-columns: 1fr;
  }
  .article-hero-inner {
    padding-right: 0;
  }
  .article-hero-art {
    opacity: 0.35;
  }
  .explore-sticker {
    font-size: 15px;
    padding: 12px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cover,
  .explore-sticker,
  .article-cta .button {
    transition: none !important;
  }
  .tile-link:hover .cover,
  .explore-sticker:hover {
    transform: none !important;
  }
}
