/* Shared styles for /blog pages. Mirrors the tokens and type of /index.html. */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-300-normal.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
}

:root {
  --ink: #000000;
  --paper: #ffffff;
  --graphite: #5e5e5e;
  --rule: #e2e2e2;
  --mist: #f6f6f6;
  --gutter: clamp(20px, 4vw, 48px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

.wordmark {
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav ul {
  display: flex;
  gap: clamp(14px, 3vw, 36px);
  list-style: none;
  font-size: 15px;
}

.nav ul a {
  text-decoration: none;
  color: var(--graphite);
}

.nav ul a:hover,
.nav ul a[aria-current="page"] {
  color: var(--ink);
}

@media (max-width: 640px) {
  .nav ul li.hide-sm {
    display: none;
  }
}

/* ---------- Blog index ---------- */
.head {
  padding: clamp(72px, 11vw, 136px) 0 clamp(48px, 7vw, 80px);
}

.head h1 {
  font-weight: 300;
  font-size: clamp(42px, 6.4vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.head p {
  margin-top: 24px;
  font-size: clamp(17px, 1.7vw, 20px);
  color: var(--graphite);
  max-width: 46ch;
}

.list {
  border-top: 1px solid var(--ink);
  padding-bottom: clamp(48px, 7vw, 80px);
}

.post-row {
  display: grid;
  grid-template-columns: 3fr 9fr;
  gap: 12px 48px;
  padding: 32px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}

.post-row time {
  font-size: 15px;
  color: var(--graphite);
  padding-top: 6px;
}

.post-row h2 {
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  max-width: 32ch;
}

.post-row p {
  margin-top: 10px;
  font-size: 16px;
  color: var(--graphite);
  max-width: 62ch;
}

.post-row .read {
  display: inline-block;
  margin-top: 14px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.post-row:hover h2 {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

@media (max-width: 760px) {
  .post-row {
    grid-template-columns: 1fr;
  }

  .post-row time {
    padding-top: 0;
  }
}

/* ---------- Article ---------- */
.article {
  padding: clamp(56px, 9vw, 112px) 0 clamp(64px, 9vw, 120px);
}

.article-grid {
  display: grid;
  grid-template-columns: 3fr 9fr;
  gap: 24px 48px;
}

.article-meta {
  font-size: 15px;
  color: var(--graphite);
  line-height: 1.5;
}

.article-meta a {
  display: inline-block;
  margin-bottom: 28px;
  text-decoration: none;
  color: var(--graphite);
}

.article-meta a:hover {
  color: var(--ink);
}

.article-meta p + p {
  margin-top: 4px;
}

.article-body {
  min-width: 0;
  max-width: 720px;
}

.article-body h1 {
  font-weight: 300;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.article-body .lead {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--ink);
  font-size: clamp(19px, 2vw, 22px);
  font-weight: 300;
  line-height: 1.5;
}

.prose h2 {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.3;
  margin: 56px 0 14px;
}

.prose p,
.prose li {
  font-size: 17px;
  line-height: 1.75;
}

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

.prose ul {
  margin: 18px 0;
  padding-left: 1.2em;
}

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

.prose li::marker {
  color: var(--graphite);
}

.prose strong {
  font-weight: 500;
}

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

.prose a:hover {
  color: var(--graphite);
}

/* Figure */
.chart-figure {
  margin: 28px 0;
  padding: clamp(18px, 3vw, 28px) clamp(16px, 3vw, 28px) 18px;
  border: 1px solid var(--rule);
}

.chart-figure svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-figure figcaption {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  line-height: 1.6;
  color: var(--graphite);
}

.chart-figure figcaption strong {
  color: var(--ink);
  font-weight: 500;
}

/* Sources */
.sources {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.sources h2 {
  font-size: 15px !important;
  margin: 0 0 10px !important;
}

.sources h2 + ul + h2 {
  margin-top: 24px !important;
}

.sources li {
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: var(--graphite);
}

/* Subscribe (HubSpot form) */
.subscribe {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--ink);
}

.subscribe h2 {
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.01em;
  margin: 0;
}

.subscribe p {
  margin-top: 4px;
  font-size: 15px;
  color: var(--graphite);
  max-width: 52ch;
}

.signup {
  margin-top: 20px;
  max-width: 640px;
}

.signup-fields {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto;
  gap: 10px;
}

.signup label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.signup input {
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #bdbdbd;
  border-radius: 2px;
  padding: 11px 14px;
  min-width: 0;
}

.signup input::placeholder {
  color: #8a8a8a;
}

.signup input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

.signup button {
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  padding: 11px 22px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.signup button:hover:not(:disabled) {
  background: var(--paper);
  color: var(--ink);
}

.signup button:disabled {
  cursor: default;
  opacity: 0.6;
}

.signup-status {
  margin-top: 10px;
  min-height: 1.5em;
  font-size: 14px;
  color: var(--graphite);
}

.signup.is-done .signup-status {
  color: var(--ink);
}

.signup-note {
  margin-top: 2px;
  font-size: 13px !important;
  color: var(--graphite);
}

@media (max-width: 640px) {
  .signup-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}

.list + .subscribe {
  margin-top: 0;
  margin-bottom: clamp(72px, 10vw, 128px);
}

.btn {
  display: inline-block;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  padding: 12px 22px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  transition: background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  background: var(--paper);
  color: var(--ink);
}

@media (max-width: 760px) {
  .article-grid {
    grid-template-columns: 1fr;
  }

  .article-meta a {
    margin-bottom: 8px;
  }
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--rule);
  padding: 28px 0 36px;
  font-size: 14px;
  color: var(--graphite);
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn {
    transition: none;
  }
}
