/* ==========================================================================
   Heifereum — Content Hub
   Scoped styles for content-hub.html and the long-form guide pages.
   Palette follows the Webflow tokens already used site-wide:
     bg #0c0c0c · surface #131112 / #18191a · line #242424
     teal #1d83a8 · purple #a06fd6 · text #ffffff · muted #c6c6cb
   ========================================================================== */

:root {
  --hf-bg: #0c0c0c;
  --hf-surface: #131112;
  --hf-surface-2: #18191a;
  --hf-line: #242424;
  --hf-line-soft: #1e1f21;
  --hf-teal: #1d83a8;
  --hf-purple: #a06fd6;
  --hf-text: #ffffff;
  --hf-muted: #c6c6cb;
  --hf-dim: #8b8b93;
  --hf-grad: linear-gradient(214deg, #1d83a8, #a06fd6);
}

/* ---------- shared bits --------------------------------------------------- */

.hf-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--hf-line);
  border-radius: 100px;
  background: rgba(255, 255, 255, .03);
  color: #d4bcf3;
  font-family: Manrope, Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hf-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hf-grad);
}

/* ---------- hub layout ---------------------------------------------------- */

.hf-hub-section {
  padding: 0 0 120px;
}

.hf-hub-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

/* sidebar ------------------------------------------------------------------ */

.hf-hub-sidebar {
  position: sticky;
  top: 120px;
  border-right: 1px solid var(--hf-line-soft);
  padding-right: 24px;
}

.hf-side-group + .hf-side-group {
  margin-top: 28px;
}

.hf-side-label {
  margin: 0 0 12px;
  padding: 0 12px;
  color: var(--hf-dim);
  font-family: Manrope, Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hf-side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--hf-muted);
  font-family: Manrope, Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.hf-side-link:hover {
  background: rgba(255, 255, 255, .05);
  color: var(--hf-text);
}

.hf-side-link.is-active {
  background: rgba(160, 111, 214, .14);
  color: var(--hf-text);
  font-weight: 600;
}

.hf-side-link svg {
  flex: none;
  width: 17px;
  height: 17px;
  opacity: .75;
}

.hf-side-link .hf-side-count {
  margin-left: auto;
  color: var(--hf-dim);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.hf-side-sub {
  margin: 6px 0 0 22px;
  padding-left: 14px;
  border-left: 1px solid var(--hf-line);
}

.hf-side-sub .hf-side-link {
  padding: 9px 12px;
  font-size: 15px;
}

/* toolbar ------------------------------------------------------------------ */

.hf-hub-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.hf-search {
  position: relative;
  flex: 1 1 auto;
}

.hf-search svg {
  position: absolute;
  top: 50%;
  left: 20px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--hf-dim);
  pointer-events: none;
}

.hf-search input {
  width: 100%;
  height: 56px;
  padding: 0 20px 0 52px;
  border: 1px solid var(--hf-line);
  border-radius: 12px;
  background: var(--hf-surface);
  color: var(--hf-text);
  font-family: Manrope, Arial, sans-serif;
  font-size: 16px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.hf-search input::placeholder { color: var(--hf-dim); }

.hf-search input:focus {
  border-color: rgba(160, 111, 214, .55);
  box-shadow: 0 0 0 3px rgba(160, 111, 214, .12);
}

.hf-result-count {
  flex: none;
  color: var(--hf-dim);
  font-family: Manrope, Arial, sans-serif;
  font-size: 14px;
}

/* card grid ---------------------------------------------------------------- */

.hf-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.hf-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--hf-line);
  border-radius: 16px;
  background: var(--hf-surface);
  text-decoration: none;
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
}

.hf-card:hover {
  transform: translateY(-4px);
  border-color: rgba(160, 111, 214, .45);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
}

.hf-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f0f10;
}

.hf-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.hf-card:hover .hf-card-media img { transform: scale(1.04); }

.hf-card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  padding: 22px 22px 20px;
}

.hf-card-tag {
  align-self: flex-start;
  padding: 5px 11px;
  border: 1px solid var(--hf-line);
  border-radius: 100px;
  color: #cbb2ea;
  font-family: Manrope, Arial, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.hf-card-title {
  margin: 0;
  color: var(--hf-text);
  font-family: Switzer, Manrope, Arial, sans-serif;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.32;
}

.hf-card-desc {
  margin: 0;
  color: var(--hf-muted);
  font-family: Manrope, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

.hf-card-meta {
  display: flex;
  gap: 14px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--hf-line-soft);
  color: var(--hf-dim);
  font-family: Manrope, Arial, sans-serif;
  font-size: 13px;
}

.hf-card-meta span { display: inline-flex; align-items: center; gap: 6px; }

.hf-empty {
  display: none;
  padding: 72px 24px;
  border: 1px dashed var(--hf-line);
  border-radius: 16px;
  color: var(--hf-dim);
  font-family: Manrope, Arial, sans-serif;
  font-size: 16px;
  text-align: center;
}

.hf-empty.is-visible { display: block; }

/* ---------- guide article ------------------------------------------------- */

.hf-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 262px;
  gap: 64px;
  align-items: start;
}

.hf-toc {
  position: sticky;
  top: 120px;
  padding: 24px 20px;
  border: 1px solid var(--hf-line);
  border-radius: 16px;
  background: var(--hf-surface);
}

.hf-toc h4 {
  margin: 0 0 14px;
  color: var(--hf-dim);
  font-family: Manrope, Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hf-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.hf-toc li { margin: 0; }

.hf-toc a {
  display: block;
  padding: 7px 0 7px 14px;
  border-left: 2px solid var(--hf-line);
  color: var(--hf-muted);
  font-family: Manrope, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  text-decoration: none;
  transition: color .2s ease, border-color .2s ease;
}

.hf-toc a:hover,
.hf-toc a.is-current {
  border-left-color: var(--hf-purple);
  color: var(--hf-text);
}

/* long-form typography ------------------------------------------------------ */

.hf-prose {
  color: var(--hf-muted);
  font-family: Manrope, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.78;
}

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

.hf-prose p { margin: 0 0 22px; }

.hf-prose strong { color: var(--hf-text); font-weight: 700; }

.hf-prose a { color: #b48ee4; text-decoration: underline; }

.hf-prose h2 {
  margin: 56px 0 18px;
  color: var(--hf-text);
  font-family: Switzer, Manrope, Arial, sans-serif;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.28;
  scroll-margin-top: 120px;
}

.hf-prose h3 {
  margin: 38px 0 14px;
  color: var(--hf-text);
  font-family: Switzer, Manrope, Arial, sans-serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.35;
  scroll-margin-top: 120px;
}

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

.hf-prose li { margin-bottom: 10px; padding-left: 4px; }

.hf-prose ul li::marker { color: var(--hf-purple); }
.hf-prose ol li::marker { color: var(--hf-purple); font-weight: 700; }

.hf-prose blockquote {
  margin: 32px 0;
  padding: 20px 26px;
  border-left: 3px solid transparent;
  border-image: var(--hf-grad) 1;
  background: rgba(160, 111, 214, .07);
  color: var(--hf-text);
  font-size: 19px;
  font-style: italic;
  line-height: 1.6;
}

/* ascii flow diagrams from the source doc */
.hf-flow {
  margin: 28px 0;
  padding: 24px 26px;
  overflow-x: auto;
  border: 1px solid var(--hf-line);
  border-radius: 12px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(160, 111, 214, .10), transparent 60%),
    var(--hf-surface-2);
  color: #e4e4e8;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  line-height: 1.7;
  white-space: pre;
}

.hf-table-wrap {
  margin: 30px 0;
  overflow-x: auto;
  border: 1px solid var(--hf-line);
  border-radius: 12px;
}

.hf-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.hf-prose thead th {
  padding: 15px 18px;
  border-bottom: 1px solid var(--hf-line);
  background: var(--hf-surface-2);
  color: var(--hf-text);
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.hf-prose tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--hf-line-soft);
  vertical-align: top;
}

.hf-prose tbody tr:last-child td { border-bottom: 0; }
.hf-prose tbody tr:hover td { background: rgba(255, 255, 255, .02); }

/* callout that closes each guide */
.hf-note {
  display: flex;
  gap: 14px;
  margin: 40px 0 0;
  padding: 20px 22px;
  border: 1px solid var(--hf-line);
  border-radius: 12px;
  background: var(--hf-surface);
  color: var(--hf-dim);
  font-family: Manrope, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.65;
}

.hf-note svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--hf-purple); }

/* article header ----------------------------------------------------------- */

.hf-article-hero { padding: 180px 0 0; }

.hf-breadcrumb {
  margin-bottom: 22px;
  color: var(--hf-dim);
  font-family: Manrope, Arial, sans-serif;
  font-size: 14px;
}

.hf-breadcrumb a { color: var(--hf-dim); text-decoration: none; }
.hf-breadcrumb a:hover { color: var(--hf-text); }
.hf-breadcrumb span { margin: 0 8px; opacity: .5; }

.hf-article-title {
  max-width: 900px;
  margin: 18px 0 20px;
  color: var(--hf-text);
  font-family: Switzer, Manrope, Arial, sans-serif;
  font-size: 54px;
  font-weight: 600;
  line-height: 1.12;
}

.hf-article-standfirst {
  max-width: 780px;
  margin: 0 0 32px;
  color: var(--hf-muted);
  font-family: Manrope, Arial, sans-serif;
  font-size: 20px;
  line-height: 1.65;
}

.hf-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding-bottom: 44px;
  color: var(--hf-dim);
  font-family: Manrope, Arial, sans-serif;
  font-size: 15px;
}

.hf-byline { display: flex; align-items: center; gap: 10px; color: var(--hf-muted); }
.hf-byline img { width: 34px; height: 34px; border-radius: 50%; background: var(--hf-surface-2); padding: 5px; }
.hf-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--hf-line); }

.hf-article-cover {
  overflow: hidden;
  border: 1px solid var(--hf-line);
  border-radius: 18px;
}

.hf-article-cover img { display: block; width: 100%; height: auto; }

.hf-article-section { padding: 56px 0 100px; }

/* next / prev -------------------------------------------------------------- */

.hf-more { padding: 0 0 110px; }

.hf-more-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--hf-line-soft);
}

.hf-more-head h2 {
  margin: 0;
  color: var(--hf-text);
  font-family: Switzer, Manrope, Arial, sans-serif;
  font-size: 30px;
  font-weight: 600;
}

.hf-more-head a {
  color: #b48ee4;
  font-family: Manrope, Arial, sans-serif;
  font-size: 15px;
  text-decoration: none;
}

.hf-more-head a:hover { text-decoration: underline; }

/* ---------- responsive ---------------------------------------------------- */

@media (max-width: 1200px) {
  .hf-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hf-article-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hf-toc { position: static; order: -1; }
  .hf-article-title { font-size: 44px; }
}

@media (max-width: 991px) {
  .hf-hub-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }

  .hf-hub-sidebar {
    position: static;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 0 12px;
    border-right: 0;
    border-bottom: 1px solid var(--hf-line-soft);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .hf-hub-sidebar::-webkit-scrollbar { display: none; }
  .hf-side-group + .hf-side-group { margin-top: 0; }
  .hf-side-group { display: flex; gap: 8px; }
  .hf-side-label { display: none; }
  .hf-side-link { white-space: nowrap; border: 1px solid var(--hf-line); }
  .hf-side-link svg,
  .hf-side-link .hf-side-count { display: none; }
  .hf-side-sub { display: flex; gap: 8px; margin: 0; padding: 0; border-left: 0; }
}

@media (max-width: 767px) {
  .hf-hub-section { padding-bottom: 80px; }
  .hf-card-grid { grid-template-columns: minmax(0, 1fr); }
  .hf-hub-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .hf-result-count { text-align: right; }
  .hf-article-hero { padding-top: 140px; }
  .hf-article-title { font-size: 34px; }
  .hf-article-standfirst { font-size: 17px; }
  .hf-prose { font-size: 17px; }
  .hf-prose h2 { font-size: 26px; margin-top: 44px; }
  .hf-prose h3 { font-size: 20px; }
  .hf-flow { font-size: 13px; padding: 18px; }
  .hf-more-head { flex-direction: column; align-items: flex-start; gap: 8px; }
}
