/* ══════════════════════════════════════════════════════════════════════════
   Blog — /blog and /blog/<slug>

   Loaded after styles.css and built only from its tokens, so the articles
   read as the same site as the landing.

   Desktop gets the landing's full 1180px stage: a wide hero, then the
   article beside a sticky table of contents. The text column itself stays
   near 70 characters — wider lines are harder to read, not easier — so the
   extra room goes to the hero and the contents rail, not to the paragraphs.
   ══════════════════════════════════════════════════════════════════════════ */

.blog-main {
  padding: 0 0 20px;
}

.blog-wide {
  max-width: 1180px;
  margin: 0 auto;
}

/* ── shared hero shell ──────────────────────────────────────────────── */

.blog-hero,
.article-hero {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  isolation: isolate;
}

.blog-hero .hero-dots,
.article-hero .hero-dots {
  z-index: -1;
  -webkit-mask-image: radial-gradient(80% 90% at 70% 40%, #000, transparent 80%);
  mask-image: radial-gradient(80% 90% at 70% 40%, #000, transparent 80%);
}

.blog-wash {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 107, 74, 0.16), transparent 42%),
    radial-gradient(circle at 78% 30%, rgba(124, 92, 255, 0.16), transparent 44%),
    radial-gradient(circle at 60% 95%, rgba(56, 189, 248, 0.12), transparent 46%);
}

/* ── index hero ─────────────────────────────────────────────────────── */

.blog-hero {
  margin-top: 8px;
  padding: 64px 60px;
  display: grid;
  gap: 48px;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
}

.blog-hero .badge {
  margin-top: 0;
}

.blog-title {
  font-size: clamp(36px, 5vw, 66px);
  line-height: 1;
  margin-top: 22px;
}

.hl {
  background: linear-gradient(100deg, var(--coral-text), #e0613f 55%, var(--violet-text));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.blog-hero-sub {
  font-size: clamp(16.5px, 1.4vw, 19px);
  line-height: 1.6;
  color: var(--ink-3);
  margin-top: 22px;
  max-width: 540px;
}

.topic-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.topic {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-pill);
  padding: 9px 16px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  box-shadow: var(--lift-1);
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}

.topic:hover {
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: var(--lift-2);
}

.topic-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

/* The decorative chat: what the product does, shown instead of told. */
.hero-chat {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 380px;
  background: #efeae2;
  border-radius: 28px;
  padding: 18px 16px 22px;
  box-shadow: var(--lift-3);
  border: 8px solid #fff;
  transform: rotate(1.5deg);
}

.hero-chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 14px;
  padding: 9px 12px;
  margin-bottom: 14px;
}

.hero-chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff1ed;
  display: grid;
  place-items: center;
  flex: none;
}

.hero-chat-name {
  font-weight: 700;
  font-size: 14px;
  color: #111b21;
  line-height: 1.2;
}

.hero-chat-status {
  font-size: 11.5px;
  color: #008069;
}

.hero-chat .wa-msg {
  font-size: 14px;
  margin-top: 8px;
  animation: pop-in 0.5s both;
}

.hero-chat .wa-msg:nth-of-type(2) {
  animation-delay: 0.35s;
}

.hero-chat .wa-msg:nth-of-type(3) {
  animation-delay: 0.7s;
}

.hero-chat .wa-msg:nth-of-type(4) {
  animation-delay: 1.05s;
}

.wa-time {
  display: block;
  text-align: right;
  font-size: 10.5px;
  color: #667781;
  margin-top: 2px;
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-ticket {
  position: absolute;
  left: -38px;
  bottom: -26px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 12px 16px;
  box-shadow: var(--lift-3);
  transform: rotate(-4deg);
  animation: floaty 9s ease-in-out infinite;
  --tilt: rotate(-4deg);
}

.hero-ticket-l {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.hero-ticket-n {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--coral-text);
}

.hero-ticket-s {
  font-size: 12px;
  font-weight: 600;
  color: var(--green-text);
  margin-top: 4px;
}

/* ── index: featured + list ─────────────────────────────────────────── */

.featured {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 0;
  margin-top: 22px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  overflow: hidden;
  color: var(--ink);
  transition:
    box-shadow 0.18s,
    transform 0.18s;
}

.featured:hover {
  color: var(--ink);
  box-shadow: var(--lift-3);
  transform: translateY(-2px);
}

.featured-media {
  background: var(--well);
  padding: 28px;
  display: grid;
  place-items: center;
}

.featured-media img {
  border-radius: var(--r-md);
  border: 1px solid var(--hairline-2);
  box-shadow: var(--lift-2);
}

.featured-body {
  padding: 44px 44px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}

.featured-body h2 {
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.12;
}

.featured-body p {
  color: var(--ink-3);
  font-size: 16.5px;
  line-height: 1.6;
}

.featured-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.list-h {
  font-size: 26px;
  margin: 48px 4px 16px;
}

.post-list {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  padding: 0 0 50px;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 30px;
  color: var(--ink);
  transition:
    box-shadow 0.18s,
    transform 0.18s;
}

.post-card:hover {
  color: var(--ink);
  box-shadow: var(--lift-3);
  transform: translateY(-2px);
}

.post-card h2,
.post-card h3 {
  font-size: 23px;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.post-card p {
  color: var(--ink-3);
  font-size: 15.5px;
  line-height: 1.6;
}

.post-more {
  margin-top: auto;
  font-weight: 700;
  font-size: 15px;
  color: var(--coral-text);
}

.post-tag {
  align-self: flex-start;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 11px;
  border-radius: var(--r-pill);
}

.post-meta {
  font-size: 14px;
  color: var(--ink-3);
}

/* ── article hero ───────────────────────────────────────────────────── */

.article-hero {
  margin-top: 8px;
  padding: 44px 56px 52px;
  display: grid;
  gap: 44px;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
}

.crumbs {
  font-size: 14px;
  color: var(--ink-3);
  margin-bottom: 24px;
}

.crumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.crumbs li + li::before {
  content: "›";
  margin-right: 6px;
  color: var(--ink-faint);
}

.crumbs a {
  color: var(--ink-2);
}

.article-hero h1 {
  font-size: clamp(32px, 4.2vw, 54px);
  line-height: 1.04;
  margin-top: 16px;
}

.article-hero .post-meta {
  margin-top: 18px;
}

.article-lead {
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink-2);
  margin-top: 20px;
  max-width: 640px;
}

.article-art {
  justify-self: center;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 26px;
  padding: 10px;
  box-shadow: var(--lift-3);
  transform: rotate(1.2deg);
}

.article-art img {
  border-radius: 18px;
  width: 100%;
}

.article-art.is-portrait {
  max-width: 260px;
}

/* ── article body ───────────────────────────────────────────────────── */

.article-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 28px;
  margin-top: 22px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 112px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 22px 22px 18px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}

.toc-h {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
  font-size: 14.5px;
  line-height: 1.4;
}

.toc li a {
  display: block;
  color: var(--ink-2);
  padding: 6px 10px;
  border-radius: 9px;
}

.toc li a:hover {
  color: var(--ink);
  background: var(--well);
}

.toc li a.is-active {
  color: var(--coral-text);
  background: var(--coral-tint);
  font-weight: 600;
}

.toc-cta {
  display: block;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.5;
}

.toc-cta .btn {
  display: block;
  margin-top: 10px;
  font-size: 14.5px;
  padding: 11px 14px;
  border-radius: 12px;
}

.article {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: 56px clamp(28px, 6vw, 80px) 60px;
  min-width: 0;
}

.prose {
  font-size: 18px;
  line-height: 1.78;
  color: var(--ink-2);
  max-width: 720px;
  margin: 0 auto;
}

.prose > * + * {
  margin-top: 18px;
}

.prose > h2:first-child {
  margin-top: 0;
}

.prose h2 {
  font-size: clamp(25px, 2.6vw, 32px);
  color: var(--ink);
  margin-top: 52px;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.prose h3 {
  font-size: 21px;
  color: var(--ink);
  margin-top: 32px;
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.prose h2 + *,
.prose h3 + * {
  margin-top: 12px;
}

.prose strong {
  color: var(--ink);
}

.prose a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose ul,
.prose ol {
  padding-left: 24px;
  margin-bottom: 0;
}

.prose li + li {
  margin-top: 8px;
}

.prose figure {
  margin: 34px 0;
}

.prose figure img {
  border-radius: var(--r-md);
  border: 1px solid var(--hairline-2);
  margin: 0 auto;
}

.prose figcaption {
  font-size: 14px;
  color: var(--ink-3);
  text-align: center;
  margin-top: 10px;
  line-height: 1.5;
}

.prose .narrow-shot img {
  max-width: 340px;
  width: 100%;
}

.callout {
  background: var(--coral-tint);
  border-radius: var(--r-md);
  padding: 20px 24px;
  color: var(--ink);
  font-size: 16.5px;
  line-height: 1.65;
}

.callout-violet {
  background: var(--violet-tint);
}

.callout-green {
  background: var(--green-tint);
}

.callout-h {
  font-weight: 800;
  margin-bottom: 4px;
}

/* Comparison tables scroll sideways on a phone instead of squeezing five
   columns into 360px. The wrapper is focusable so keyboard users can scroll
   it too. */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-md);
}

.prose table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}

.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
}

.prose thead th {
  background: var(--well);
  color: var(--ink);
  font-weight: 700;
}

.prose tbody tr:last-child td {
  border-bottom: 0;
}

.prose td:first-child {
  font-weight: 600;
  color: var(--ink);
}

/* WhatsApp message samples. */
.wa-sample {
  background: #efeae2;
  border-radius: var(--r-md);
  padding: 18px;
  display: grid;
  gap: 8px;
}

.wa-msg {
  justify-self: start;
  max-width: 92%;
  background: #fff;
  color: #111b21;
  border-radius: 10px;
  border-top-left-radius: 0;
  padding: 9px 12px;
  font-size: 15px;
  line-height: 1.5;
  box-shadow: 0 1px 1px rgba(11, 20, 26, 0.13);
  white-space: pre-line;
}

.hero-chat .wa-msg {
  display: block;
  width: fit-content;
}

.wa-msg.out {
  justify-self: end;
  margin-left: auto;
  background: #d9fdd3;
  border-top-left-radius: 10px;
  border-top-right-radius: 0;
}

/* ── closing ────────────────────────────────────────────────────────── */

.post-cta {
  max-width: 720px;
  margin: 52px auto 0;
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 36px 32px;
  text-align: center;
}

.post-cta h2 {
  font-size: clamp(24px, 3vw, 30px);
  color: #fff;
}

.post-cta p {
  color: #c8ccd3;
  margin: 12px auto 22px;
  max-width: 480px;
  line-height: 1.6;
}

.related {
  margin-top: 40px;
}

.related-h {
  font-size: 26px;
  margin: 0 4px 16px;
}

/* ── responsive ─────────────────────────────────────────────────────── */

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

  /* Below the rail width the contents sit above the article as a card. */
  .toc {
    position: static;
    max-height: none;
  }

  .toc-cta {
    display: none;
  }
}

@media (max-width: 900px) {
  .blog-hero,
  .article-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .blog-hero {
    padding: 48px 32px;
  }

  .article-hero {
    padding: 36px 32px 40px;
  }

  .hero-chat {
    max-width: 360px;
  }

  .hero-ticket {
    left: -14px;
  }

  .blog-hero {
    padding-bottom: 64px;
  }

  .article-art {
    max-width: 520px;
  }

  .featured {
    grid-template-columns: minmax(0, 1fr);
  }

  .featured-body {
    padding: 30px 28px 32px;
  }
}

@media (max-width: 640px) {
  .blog-hero {
    padding: 36px 20px 40px;
    gap: 36px;
    border-radius: var(--r-lg);
  }

  .article-hero {
    padding: 28px 20px 32px;
    gap: 30px;
    border-radius: var(--r-lg);
  }

  .hero-chat {
    transform: none;
  }

  .hero-ticket {
    display: none;
  }

  .article-art {
    transform: none;
  }

  .article {
    padding: 30px 20px 34px;
    border-radius: var(--r-lg);
  }

  .article-lead {
    font-size: 17.5px;
  }

  .prose {
    font-size: 16.5px;
  }

  .post-cta {
    padding: 28px 20px;
  }

  .post-card {
    padding: 24px;
  }

  .featured-media {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .post-card,
  .featured,
  .topic {
    transition: none;
  }

  .post-card:hover,
  .featured:hover,
  .topic:hover {
    transform: none;
  }

  .hero-chat .wa-msg,
  .hero-ticket {
    animation: none;
  }
}
