/* Studiobot — journal page
   Styles used only on journal.html. */

/* ================= Journal page ================= */
/* sticky glass filter bar (sits just under the fixed header) */
.filter-sticky { position: sticky; top: 76px; z-index: 40; margin-bottom: 3rem; }
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 9999px;
  background: rgba(247, 247, 248, 0.7);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 40px -24px rgba(7, 7, 10, 0.25);
}
.filter-pills {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
  padding-right: 2rem;
  /* soft fade at the right edge so it's clear the topics scroll */
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 3rem), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 3rem), transparent);
}
.filter-pills::-webkit-scrollbar { display: none; }
.filter-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 9999px;
  font-size: 14px;
  white-space: nowrap;
  color: rgba(7, 7, 10, 0.7);
  transition: background-color 0.25s, color 0.25s;
}
.filter-pill span { font-size: 11px; font-family: "JetBrains Mono", monospace; color: rgba(7, 7, 10, 0.4); transition: color 0.25s; }
.filter-pill:hover { background: rgba(7, 7, 10, 0.05); color: #07070a; }
.filter-pill.is-active { background: #07070a; color: #f2efe9; }
.filter-pill.is-active span { color: #f17f2f; }
.search-box {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 240px;
  padding: 0.55rem 1rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(7, 7, 10, 0.08);
}
.search-box svg { width: 16px; height: 16px; flex: 0 0 auto; color: rgba(7, 7, 10, 0.45); }
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-box input { width: 100%; background: transparent; font: inherit; font-size: 14px; outline: none; }
.search-box:focus-within { border-color: #f17f2f; box-shadow: 0 0 0 3px rgba(241, 127, 47, 0.15); }
@media (max-width: 767px) {
  .filter-bar { flex-direction: column; align-items: stretch; border-radius: 1.5rem; }
  .search-box { width: 100%; }
}

/* featured article */
.featured-card {
  display: grid;
  gap: 2rem;
  align-items: center;
  margin-bottom: 4rem;
}
@media (min-width: 1024px) { .featured-card { grid-template-columns: 1.25fr 1fr; gap: 3.5rem; } }
.featured-media { aspect-ratio: 16 / 10; }
.featured-badge { padding: 0.4rem 0.85rem; border-radius: 9999px; background: #f17f2f; color: #07070a; font-size: 12px; font-weight: 600; }
.featured-title { margin-top: 1.25rem; font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.12; transition: color 0.3s; }
.featured-card:hover .featured-title { color: #f17f2f; }
.featured-excerpt { margin-top: 1rem; font-size: 1.1rem; line-height: 1.6; color: rgba(7, 7, 10, 0.6); }

/* grid */
.insight-grid { display: grid; gap: 3.5rem 1.5rem; grid-auto-flow: dense; }
@media (min-width: 768px) { .insight-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .insight-grid { grid-template-columns: repeat(3, 1fr); }
  .insight-card.is-wide { grid-column: span 2; }
  .insight-card.is-wide .insight-media { aspect-ratio: 16 / 7.4; }
}
.insight-card { display: flex; flex-direction: column; }
.insight-card.is-hidden { display: none; }
.insight-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #e6e6ea;
}
.insight-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
/* brand tint on hover */
.insight-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #f17f2f;
  mix-blend-mode: multiply;
  opacity: 0;
  transition: opacity 0.5s;
}
.insight-card:hover .insight-media img, .featured-card:hover .insight-media img { transform: scale(1.05); }
.insight-card:hover .insight-media::after, .featured-card:hover .insight-media::after { opacity: 0.18; }
.insight-tag {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 1;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  background: rgba(7, 7, 10, 0.3);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #f2efe9;
  font-size: 12px;
  font-weight: 500;
}
.insight-tag--static { position: static; background: rgba(7, 7, 10, 0.06); border-color: rgba(7, 7, 10, 0.08); color: rgba(7, 7, 10, 0.7); }
.insight-meta { font-size: 13px; color: rgba(7, 7, 10, 0.45); }
.insight-title {
  margin-top: 0.5rem;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
  transition: color 0.3s;
}
.insight-card.is-wide .insight-title { font-size: 1.6rem; }
.insight-card:hover .insight-title { color: #f17f2f; }
.insight-excerpt { margin-top: 0.6rem; line-height: 1.6; color: rgba(7, 7, 10, 0.6); }
.insight-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; }
.insight-author { display: inline-flex; align-items: center; gap: 0.55rem; font-size: 13px; font-weight: 500; color: rgba(7, 7, 10, 0.7); }
.author-avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9999px; background: #07070a; color: #f2efe9; }
.author-avatar svg { width: 15px; height: 15px; }
.insight-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  align-self: flex-start;
  padding-bottom: 2px;
  border-bottom: 1.5px solid #f17f2f;
  font-size: 14px;
  font-weight: 600;
}
.featured-body .insight-link { margin-top: 1.75rem; }
.featured-body .insight-foot { justify-content: flex-start; gap: 1.25rem; }
.insight-link span { color: #f17f2f; transition: transform 0.3s; }
.insight-card:hover .insight-link span, .featured-card:hover .insight-link span { transform: translate(2px, -2px); }

/* load more */
.load-more {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem 1.8rem;
  border-radius: 9999px;
  border: 1px solid rgba(7, 7, 10, 0.2);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background-color 0.3s, border-color 0.3s;
}
.load-more:hover { background: #f17f2f; border-color: #f17f2f; }

/* empty state with the robot */
.insight-empty { display: none; padding: 4rem 0; text-align: center; }
.empty-bot { display: grid; place-items: center; width: 84px; height: 84px; margin: 0 auto 1.25rem; border-radius: 1.6rem; background: #07070a; color: #f2efe9; }
.empty-bot svg { width: 44px; height: 44px; }

/* newsletter */
.newsletter {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding: clamp(2rem, 4vw, 3.5rem);
  border-radius: 2rem;
  background: #07070a;
  color: #f2efe9;
  grid-template-columns: minmax(0, 1fr); /* let the form shrink on small phones instead of overflowing */
}
@media (min-width: 1024px) { .newsletter { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; } }
.newsletter-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.4rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.newsletter-form input { flex: 1; min-width: 0; padding: 0 1rem; background: transparent; font: inherit; font-size: 15px; color: #f2efe9; outline: none; }
.newsletter-form input::placeholder { color: rgba(242, 239, 233, 0.4); }
.newsletter-form button { padding: 0.85rem 1.5rem; border-radius: 9999px; background: #f17f2f; color: #07070a; font-size: 14px; font-weight: 600; transition: background-color 0.3s; }
.newsletter-form button:hover { background: #f2efe9; }
.newsletter.is-sent .newsletter-form { display: none; }
.newsletter-done { display: none; color: #f17f2f; font-weight: 600; }
.newsletter.is-sent .newsletter-done { display: block; }

/* Newsletter form rendered by Contact Form 7 (WordPress) */
.newsletter-form .wpcf7-form-control-wrap { display: flex; flex: 1; min-width: 0; }
.newsletter-form .wpcf7-form-control-wrap input { width: 100%; }
.newsletter-form .wpcf7-not-valid-tip { display: none; }
.newsletter-form .wpcf7-response-output { display: none; }
.newsletter-form.invalid { box-shadow: 0 0 0 2px rgba(217, 72, 15, 0.6); }
