/* ==========================================================================
   annaloverus.com additions — loaded AFTER screen.css.
   Everything here is additive; the original Ghost theme CSS is untouched.

   1) Writing page: calm dated list (replaces the Highlight magazine grid)
   2) Global typography fix: .is-body always means Source Serif 4
   3) Video pages: YouTube embed + transcript layout
   ========================================================================== */


/* --------------------------------------------------------------------------
   1) Writing index — text-first list.
      Strict two-typeface editorial system: Amarna for structure (headings,
      titles, dates, meta — via the theme's --font-meta role), Source Serif 4
      for reading text (excerpts).
   -------------------------------------------------------------------------- */

/* Writing is a reading page: it uses the standard top navigation like the
   post pages, not the hamburger overlay of the immersive brand pages.
   (screen.css hides .gh-navigation on .writing-index-template — undone here.) */
body.writing-index-template .gh-navigation {
  display: block;
}

/* Top padding was designed for the nav-less layout; rebalance with the
   100px navigation bar visible. */
body.writing-index-template .gh-writing-top {
  padding-top: 9.6rem;
}

.gh-writing-eyebrow {
  letter-spacing: 0.14em;
}

.gh-writing-headline {
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.gh-writing-list {
  padding-bottom: max(10vmin, 96px);
}

.gh-writing-year {
  color: rgba(var(--color-kite-rgb), 0.45);
  font-family: var(--font-meta);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.14em;
  margin: 0;
  padding: 5.6rem 0 0.8rem;
  text-transform: uppercase;
}

.gh-writing-year-group:first-of-type .gh-writing-year {
  padding-top: 0;
}

.gh-writing-rows {
  border-bottom: 1px solid rgba(var(--color-kite-rgb), 0.12);
}

.gh-writing-row {
  align-items: start;
  border-top: 1px solid rgba(var(--color-kite-rgb), 0.12);
  color: inherit;
  column-gap: clamp(28px, 5vw, 72px);
  display: grid;
  grid-template-columns: 12ch 1fr auto;
  padding: 3.2rem 0;
  text-decoration: none;
}

.gh-writing-row:focus-visible {
  outline: 2px solid rgba(var(--color-kite-rgb), 0.5);
  outline-offset: 6px;
}

/* --- date column --------------------------------------------------------- */

.gh-writing-row-date {
  color: rgba(var(--color-kite-rgb), 0.45);
  font-family: var(--font-meta);
  font-size: 13px;
  letter-spacing: 0.08em;
  padding-top: 0.55em; /* optically aligns with the title's first line */
  text-transform: uppercase;
  white-space: nowrap;
}

/* --- main column ---------------------------------------------------------- */

.gh-writing-row-main {
  display: block;
  min-width: 0;
}

/* Row titles are title case, not uppercase: caps are for short structural
   labels (eyebrow, years, dates), but these are full phrases being scanned
   in a list — word shape aids scanning, and quiet titles let the uppercase
   micro-labels carry the architectural rhythm. */
.gh-writing-row-title {
  color: var(--color-primary-text);
  display: block;
  font-family: var(--font-ashcroft);
  font-size: clamp(2.2rem, 1vw + 1.8rem, 3rem);
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.2;
  margin: 0;
  text-underline-offset: 0.18em;
}

.gh-writing-row:hover .gh-writing-row-title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.gh-writing-row-excerpt {
  color: rgba(var(--color-kite-rgb), 0.64);
  display: block;
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.6;
  margin: 12px 0 0;
  max-width: 58ch;
}

.gh-writing-row-meta {
  color: rgba(var(--color-kite-rgb), 0.45);
  display: block;
  font-family: var(--font-meta);
  font-size: 13px;
  letter-spacing: 0.1em;
  margin: 16px 0 0;
  text-transform: uppercase;
}

/* --- arrow column ---------------------------------------------------------- */

.gh-writing-row-arrow {
  color: rgba(var(--color-kite-rgb), 0.35);
  font-family: var(--font-ashcroft);
  font-size: 2.4rem;
  line-height: 1.35;
  transition: transform 0.2s ease, color 0.2s ease;
}

.gh-writing-row:hover .gh-writing-row-arrow {
  color: var(--color-primary-text);
  transform: translateX(6px);
}

/* --- small screens ---------------------------------------------------------- */

@media (max-width: 767px) {
  .gh-writing-row {
    grid-template-columns: 1fr;
    padding: 2.6rem 0;
    row-gap: 6px;
  }

  .gh-writing-row-date {
    padding-top: 0;
  }

  .gh-writing-row-excerpt {
    font-size: 16px;
  }

  .gh-writing-row-arrow {
    display: none;
  }
}


/* --------------------------------------------------------------------------
   2) Global typography fix — the theme only maps .is-body to a font under
      .has-sans-body / .has-serif-body. This site uses .has-helvetica-body,
      so .is-body text (footer paragraph, article excerpts) silently fell
      back to the display face. Body text is Source Serif 4 by definition.
   -------------------------------------------------------------------------- */

.is-body {
  font-family: var(--font-serif);
}


/* --------------------------------------------------------------------------
   3) Video pages — embed + transcript
   -------------------------------------------------------------------------- */

.gh-video-embed {
  aspect-ratio: 16 / 9;
  background: var(--color-kite);
  margin: 48px 0 0;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.gh-video-embed iframe {
  border: 0;
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

/* The "Video" label above the title reuses the tag style without a link */
span.gh-article-tag {
  cursor: default;
  display: inline-block;
}

/* Video pages share the snow-cream editorial background of the writing page */
body.video-template {
  --background-color: var(--color-snow);
  --color-primary-text: var(--color-kite);
  --color-secondary-text: rgba(var(--color-kite-rgb), 0.64);
  background-color: var(--background-color);
}
