/* Moonbrim — /stories/ section stylesheet (generator-owned).
   Loaded ALONGSIDE /assets/style.css, which supplies every shared token and
   base component this file reuses (navy/gold/ink custom properties, .page,
   .card, .social-pill, .back-link, .hint, the serif heading font).
   Regenerated deterministically by pipeline/site_gen.py on every run — hand
   edits here will be overwritten on the next generate.
   NOTE: never write a star-slash sequence inside this comment — the
   original header said "--navy-*" + "/" which closed the comment early and
   silently ate the FIRST rule (.story-grid) in every browser. */

.story-grid {
  display: grid;
  /* 200px poster columns: a video-wall that actually uses wide screens
     (6-7 columns at 1440+), instead of the old 3×1080px cap. */
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto 2.5rem;
}

.story-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.story-card:hover {
  transform: translateY(-3px);
  border-color: rgba(242, 200, 121, 0.5);
  box-shadow: 0 10px 30px rgba(242, 200, 121, 0.12);
}

.story-card h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--gold-soft);
}

.story-card .tease {
  margin: 0;
  flex: 1;
  color: var(--ink-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* '3 min · #belonging' line — story pages (under the h1) and cards */
.story-meta {
  margin: 0.1rem 0 0;
  color: var(--ink-muted);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

/* podcast pointers under the audio player */
.listen-links {
  margin: 0.4rem 0 0;
  color: var(--ink-muted);
  font-size: 0.85rem;
}

.listen-links a {
  color: var(--gold);
  text-decoration: none;
}

.listen-links a:hover {
  text-decoration: underline;
}

/* 'More gentle stories' — server-rendered related block */
.related {
  margin-top: 2rem;
  width: 100%;
}

.related-heading {
  margin: 0 0 0.8rem;
  font-size: 1.05rem;
  color: var(--gold-soft);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.9rem;
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.6rem;
  background: rgba(255, 255, 255, 0.02);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.related-card:hover {
  transform: translateY(-2px);
  border-color: rgba(242, 200, 121, 0.5);
}

.related-card img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 8px;
}

.related-card h3 {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--gold-soft);
}

.related-card .related-meta {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.78rem;
}

/* thumbnail-first cards (2026-08-10 redesign). Full 9:16 poster — the
   earlier max-height cap fought the aspect-ratio and center-cropped every
   thumb into a squarish box ("not centered", reported same day). */
.card-media {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  background: rgba(255, 255, 255, 0.02);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-media .chip {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  font-size: 0.72rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  color: var(--gold-soft);
  background: rgba(10, 15, 36, 0.75);
  border: 1px solid rgba(242, 200, 121, 0.45);
}

.card-media .card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.1rem;
  color: var(--navy-deep);
  background: rgba(242, 200, 121, 0.92);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.story-card:hover .card-play {
  opacity: 1;
}

.story-card .tease {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* grid/sky view toggle */
.view-toggle {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto 0.8rem;
  display: flex;
  justify-content: flex-end;
}

#sky-toggle {
  font: inherit;
  font-size: 0.85rem;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease;
}

#sky-toggle:hover,
#sky-toggle[aria-pressed="true"] {
  color: var(--gold-soft);
  border-color: rgba(242, 200, 121, 0.5);
}

.narration p {
  font-family: ui-serif, Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.9;
  margin: 0 0 1.2rem;
}

.yt-facade {
  position: relative;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 9 / 16;
  margin: 1.75rem auto;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.yt-facade-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yt-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 64px;
  height: 64px;
  padding: 0;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 15, 36, 0.75);
  color: var(--gold-soft);
  cursor: pointer;
}

.story-audio {
  display: block;
  width: 100%;
  max-width: 340px;
  margin: 1rem auto;
}

.platform-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin: 1.75rem 0;
}
