/* ============================================================
   Journal (splitbear.app/journal/) — rendered by scripts/journal.mjs.
   Loaded after style.css, so it uses the site's tokens and only adds
   what an article needs. Ported from the SplitBear-Content mockup.
   ============================================================ */

.journal .nw { white-space: nowrap; }
.journal :focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 3px; }
.header-journal[aria-current] { color: var(--accent-deep); }

/* ---------- Article ---------- */
.post { max-width: 720px; margin: 0 auto; padding: clamp(2.25rem, 7vw, 4rem) clamp(1.25rem, 5vw, 2.5rem) 2rem; }
.post-head .eyebrow a { color: inherit; }
.post h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.1rem, 7vw, 3.4rem); line-height: 1.04;
  letter-spacing: -0.02em; text-wrap: balance; font-optical-sizing: auto;
}
.dek { font-size: 1.15rem; line-height: 1.55; color: var(--ink-soft); margin-top: 1.2rem; text-wrap: pretty; }
.byline {
  font-size: 0.92rem; color: var(--ink-soft); margin-top: 1.5rem;
  padding-bottom: 2rem; border-bottom: 1px solid var(--line);
}
.post-hero { margin: 2rem 0 0.5rem; }
.post-hero img, .inline-img img { width: 100%; height: auto; border-radius: var(--radius); background: var(--line-soft); }
.inline-img { margin: 1.75rem 0; }

.post-body { padding-top: 0.5rem; }
.post-body p { line-height: 1.75; margin-top: 1.25rem; text-wrap: pretty; }
.post-body h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.6rem, 4.5vw, 2.1rem); line-height: 1.15;
  letter-spacing: -0.012em; margin-top: 3.25rem; text-wrap: balance;
}
.post-body h3 { font-family: var(--sans); font-weight: 600; font-size: 1.1rem; line-height: 1.4; margin-top: 2.25rem; }
.post-body ul { list-style: none; margin-top: 1.25rem; display: grid; gap: 0.6rem; }
.post-body li { position: relative; padding-left: 1.3rem; line-height: 1.65; }
.post-body li::before {
  content: ''; position: absolute; left: 2px; top: 0.68em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
.post-body a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }
/* A message someone could send: the articles quote texts more than letters */
.post-body blockquote {
  margin-top: 1.5rem; padding: 0.9rem 1.15rem;
  max-width: 34em; background: var(--paper-card); border: 1px solid var(--line);
  border-radius: 20px 20px 20px 6px; box-shadow: 0 10px 24px -16px rgba(58, 44, 28, 0.35);
}
.post-body blockquote p { margin-top: 0.6rem; line-height: 1.55; }
.post-body blockquote p:first-child { margin-top: 0; }

/* ---------- The card that closes every article ---------- */
.bridge {
  margin-top: 3.5rem; padding: clamp(1.5rem, 5vw, 2.25rem);
  background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--radius);
  display: grid; gap: 0.75rem; justify-items: start;
}
.bridge .kicker { font-size: 0.72rem; font-weight: 600; line-height: 1.4; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.bridge .kicker::before { content: "— "; color: var(--ink-faint); }
.bridge h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.5rem, 4vw, 1.9rem); line-height: 1.15; letter-spacing: -0.012em; }
.bridge p { color: var(--ink-soft); }
.bridge .store-badge { margin-top: 0.5rem; }
.bridge .trust-line { margin-top: 0.1rem; }

/* ---------- Journal index ---------- */
.journal-index { max-width: var(--maxw); margin: 0 auto; padding: clamp(2.25rem, 7vw, 4rem) clamp(1.25rem, 5vw, 2.5rem) 2rem; }
.journal-index-head { max-width: 760px; margin-bottom: clamp(2rem, 5vw, 3rem); }
.journal-index-head h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.2rem, 7vw, 3.4rem); line-height: 1.04;
  letter-spacing: -0.02em; text-wrap: balance;
}
.journal-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 1.5rem; }
.journal-card {
  display: flex; flex-direction: column; gap: 0.6rem;
  background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 0 1.4rem; overflow: hidden; color: inherit;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.journal-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.journal-card:active { transform: scale(0.98); }
.journal-card img { width: 100%; height: auto; aspect-ratio: 1376 / 768; object-fit: cover; background: var(--line-soft); }
.journal-card h2, .journal-card p, .journal-card .journal-meta { padding: 0 1.4rem; }
.journal-card h2 { font-family: var(--serif); font-weight: 500; font-size: 1.35rem; line-height: 1.25; text-wrap: balance; margin-top: 0.6rem; }
.journal-card p { font-size: 0.95rem; line-height: 1.6; color: var(--ink-soft); }
.journal-meta { margin-top: auto; padding-top: 0.4rem; font-size: 0.85rem; color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  .journal-card, .journal-card:hover, .journal-card:active { transition: none; transform: none; }
}
