/* The blog (backend/blog/pages.js), on top of the home page's /landing.css: the navigation, the type, the colours, the
   buttons, the closing block and the footer are the home page's own. Only the blog's pieces are here, in its tokens. */

/* The navigation: Blog is the current section. */
.nav-links a[aria-current] {
  position: relative;
  color: #ffffff;
}

.nav-links a[aria-current]::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--tangerine);
}

/* ---------- The list ---------- */

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

.blog-hero .hero-title {
  font-size: clamp(72px, 9vw, 120px);
}

.blog-posts {
  padding: 0 24px 112px;
}

.blog-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.blog-list > li {
  display: flex;
  min-width: 0;
}

.blog-card {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 10px;
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px -56px rgba(24, 20, 15, 0.35);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.25s, box-shadow 0.25s;
}

.blog-card:hover {
  color: var(--ink);
  transform: translateY(-4px);
  box-shadow: 0 44px 80px -44px rgba(24, 20, 15, 0.42);
}

.blog-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 19px;
  background: var(--grey);
}

.blog-card-text {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 16px 14px;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: 13px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.blog-meta > * + *::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 3px;
  margin-right: 10px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: middle;
  opacity: 0.6;
}

.blog-cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tangerine-text);
}

.blog-card h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 27px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.blog-excerpt {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted-2);
}

.blog-more {
  margin-top: auto;
  padding-top: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--tangerine-text);
}

/* The newest post, across the row: the home page's graphite card with its tangerine glow. */
.blog-list > li.is-featured {
  grid-column: 1 / -1;
}

.is-featured .blog-card {
  overflow: hidden;
  flex-direction: row;
  align-items: stretch;
  min-height: 380px;
  background: var(--graphite);
  border-color: var(--graphite);
  color: var(--on-graphite);
  box-shadow: 0 50px 90px -48px rgba(24, 20, 15, 0.55);
}

.is-featured .blog-card:hover {
  color: var(--on-graphite);
}

.is-featured .blog-card::before {
  content: '';
  position: absolute;
  right: -160px;
  top: -220px;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 90, 31, 0.32), rgba(255, 90, 31, 0));
  pointer-events: none;
}

.is-featured .blog-card img {
  position: relative;
  flex: 0 0 50%;
  width: 50%;
  aspect-ratio: auto;
  border-radius: 21px;
}

.is-featured .blog-card-text {
  flex: 0 1 620px;
  justify-content: center;
  gap: 18px;
  padding: 44px 48px;
}

.is-featured h2 {
  font-size: clamp(34px, 3.8vw, 50px);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.is-featured img + .blog-card-text {
  flex: 1;
  padding: 40px 44px;
}

.is-featured img + .blog-card-text h2 {
  font-size: clamp(30px, 3.1vw, 40px);
}

/* A newest post with no picture: the home page's listening rings around the mark. */
.blog-art {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle closest-side, rgba(255, 90, 31, 0.3), rgba(255, 90, 31, 0.08) 55%, rgba(255, 90, 31, 0));
}

.blog-art::before,
.blog-art::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 220px;
  height: 220px;
  margin: -110px 0 0 -110px;
  border-radius: 50%;
  border: 1px solid rgba(255, 90, 31, 0.3);
}

.blog-art::after {
  width: 380px;
  height: 380px;
  margin: -190px 0 0 -190px;
  border-color: rgba(255, 90, 31, 0.15);
}

.blog-art .mark {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  box-shadow: 0 24px 50px -14px rgba(255, 90, 31, 0.6);
}

/* A post card with no picture: its category, in the home page's italic term style. */
.blog-cover {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  aspect-ratio: 16 / 9;
  border-radius: 19px;
  background: radial-gradient(circle at 78% 110%, rgba(255, 90, 31, 0.2), rgba(255, 90, 31, 0) 62%), var(--peach-soft);
  font-family: var(--serif);
  font-style: italic;
  font-size: 40px;
  color: var(--tangerine-text);
  white-space: nowrap;
}

.blog-cover::after {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tangerine);
  opacity: 0.7;
}

.is-featured .blog-meta {
  color: var(--on-graphite-muted);
}

.is-featured .blog-cat,
.is-featured .blog-more {
  color: var(--tangerine-on-dark);
}

.is-featured .blog-excerpt {
  max-width: 600px;
  font-size: 18px;
  color: var(--on-graphite-muted);
}

.is-featured .blog-more {
  margin-top: 6px;
}

.blog-empty {
  max-width: 560px;
  margin: 0 auto;
  padding: 40px 32px;
  border-radius: 28px;
  background: var(--grey);
  text-align: center;
  font-family: var(--serif);
  font-size: 26px;
}

.blog-pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
}

.blog-pager a {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 22px;
  border-radius: 24px;
  border: 1px solid var(--line-2);
  background: #ffffff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.blog-pager a:hover {
  border-color: var(--tangerine);
  color: var(--ink);
}

/* ---------- A post ---------- */

.post-head {
  max-width: 1000px;
  margin: 0 auto;
  padding: 64px 24px 0;
  text-align: center;
}

.post-crumbs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  padding: 5px 16px 5px 5px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: #ffffff;
}

.post-crumbs > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 9px;
  border-radius: 999px;
  background: var(--grey);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.post-crumbs > a:hover {
  background: var(--peach);
  color: var(--ink);
}

.post-title {
  margin-top: 24px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(42px, 5.4vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.post-lede {
  max-width: 640px;
  margin: 24px auto 0;
  font-size: 20px;
  line-height: 1.55;
  color: var(--muted);
}

.post-cover {
  max-width: 1120px;
  margin: 56px auto 0;
  padding: 0 24px;
}

.post-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 30px;
  background: var(--grey);
  box-shadow: 0 50px 90px -50px rgba(24, 20, 15, 0.45);
}

.post-body {
  max-width: 728px;
  margin: 0 auto;
  padding: 56px 24px 0;
  font-size: 19px;
  line-height: 1.7;
  overflow-wrap: break-word;
}

.post-body > * + * {
  margin-top: 1.1em;
}

.post-body h2 {
  margin-top: 2.1em;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 3.3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.022em;
}

.post-body h3 {
  margin-top: 1.7em;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.012em;
}

.post-body h4,
.post-body h5,
.post-body h6 {
  margin-top: 1.6em;
  font-size: 1em;
  font-weight: 700;
}

.post-body h2 + *,
.post-body h3 + *,
.post-body h4 + * {
  margin-top: 0.55em;
}

.post-body a {
  color: var(--tangerine-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.post-body a:hover {
  color: #9a3412;
}

.post-body strong {
  font-weight: 650;
}

.post-body ul,
.post-body ol {
  margin-bottom: 0;
  padding-left: 0;
}

.post-body ul {
  list-style: none;
}

.post-body ol {
  padding-left: 1.6em;
}

.post-body li {
  position: relative;
}

.post-body li + li,
.post-body li > ul,
.post-body li > ol {
  margin-top: 0.45em;
}

.post-body ul > li {
  padding-left: 28px;
}

.post-body ul > li::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tangerine);
}

.post-body ul > li:has(> input[type='checkbox'])::before {
  display: none;
}

.post-body ol > li {
  padding-left: 6px;
}

.post-body ol > li::marker {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--tangerine-text);
}

.post-body blockquote {
  margin: 1.5em 0 0;
  padding: 2px 0 2px 26px;
  border-left: 3px solid var(--tangerine);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3em;
  line-height: 1.42;
}

.post-body blockquote > * + * {
  margin-top: 0.6em;
}

.post-body code {
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: var(--grey);
  font-family: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
  font-size: 0.86em;
}

.post-body pre {
  padding: 20px 24px;
  border-radius: 20px;
  background: var(--graphite);
  color: var(--on-graphite);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: auto;
}

.post-body pre code {
  padding: 0;
  background: none;
  font-size: inherit;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.5;
}

.post-body th,
.post-body td {
  padding: 12px 24px 12px 0;
  border-bottom: 1px solid var(--line-2);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.post-body th {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.post-body hr {
  width: 60px;
  height: 7px;
  margin: 2.4em auto;
  border: 0;
  background: radial-gradient(circle, var(--tangerine) 3px, transparent 3.5px) 0 0 / 20px 7px repeat-x;
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 20px;
}

.post-back {
  max-width: 728px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

.post-back .link-arrow svg {
  color: var(--tangerine-text);
}

/* The closing block's sentence (the home page's has none). */
.finale-lede {
  position: relative;
  max-width: 560px;
  margin: 22px auto 0;
  font-size: 19px;
  line-height: 1.5;
  text-wrap: balance;
}

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

  .is-featured .blog-card {
    flex-direction: column;
    min-height: 0;
  }

  .is-featured .blog-card img {
    flex: none;
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  .is-featured .blog-card-text,
  .is-featured img + .blog-card-text {
    flex: none;
    padding: 32px 28px 26px;
  }

  .blog-art {
    display: none;
  }
}

@media (max-width: 760px) {
  .blog-hero {
    padding-bottom: 40px;
  }

  .blog-posts {
    padding: 0 20px 72px;
  }

  .blog-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .is-featured .blog-card-text {
    padding: 26px 18px 18px;
  }

  .is-featured .blog-excerpt {
    font-size: 16px;
  }

  .post-head {
    padding: 44px 20px 0;
  }

  .post-crumbs {
    flex-direction: column;
    gap: 14px;
    padding: 0;
    border: 0;
    background: none;
  }

  .post-crumbs .blog-meta {
    justify-content: center;
  }

  .post-lede {
    font-size: 18px;
  }

  .post-cover {
    margin-top: 36px;
    padding: 0 12px;
  }

  .post-cover img {
    border-radius: 22px;
  }

  .post-body {
    padding: 40px 20px 0;
    font-size: 17.5px;
  }

  .post-body blockquote {
    padding-left: 18px;
  }

  .post-back {
    padding: 40px 20px 72px;
  }
}
