/*
 * css/longview.css · The Long Game — "The Long View" growth-story styles
 * Purpose: the Today entry card (.lv-entry) that opens the story, and the
 *   full-screen overlay it opens: opening lede, narrated summary, a month-by-month
 *   timeline of chapters, the "Lessons you've gathered" collection, and a gentle
 *   forward close. Extends the base design system (css/styles.css) — references the
 *   :root tokens only; declares no new colours so light/dark both work from tokens.
 *   A11y: .lv-entry and each .lv-lesson are real <button> elements (appearance reset
 *   here so they read as calm cards); 44px tap targets; focus-visible rings.
 * Related: js/home.js (renders these classes + the overlay), js/story.js (the engine),
 *          css/styles.css (token + .overlay definitions)
 */

/* ===== TODAY ENTRY CARD ===== */

/* Quiet invitation on Today — same left-accent-tick family as the prompt/insights
   cards. A real <button>; appearance reset so it looks like a calm card. We omit
   background/border (those come from .surface-card--flat, lower in source order). */
.lv-entry {
  appearance: none;
  text-align: left;
  font: inherit;
  color: inherit;
  width: 100%;
  display: block;
  margin-bottom: var(--space-5);
  border-left: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.1s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.lv-entry:hover {
  box-shadow: 0 8px 28px rgba(44, 110, 99, 0.12);
  background: color-mix(in srgb, var(--accent) 4%, var(--surface-2));
}
.lv-entry:active { transform: scale(0.995); }
.lv-entry:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.lv-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}
.lv-entry-overline {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
}
.lv-entry-arrow {
  font-size: 0.9rem;
  color: var(--accent);
  opacity: 0.75;
  transition: transform 0.2s ease;
}
.lv-entry:hover .lv-entry-arrow { transform: translateX(3px); }

.lv-entry-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.45;
  margin: 0 0 var(--space-1);
}
.lv-entry-since {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ===== OVERLAY: OPENING ===== */

.lv-lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.12rem;
  color: var(--ink);
  line-height: 1.55;
  margin: var(--space-2) 0 var(--space-3);
}
.lv-since {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0 0 var(--space-5);
}

/* ===== OVERLAY: NARRATED SUMMARY ===== */

.lv-summary {
  margin-bottom: var(--space-6);
}
.lv-summary-text {
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.7;
  margin: 0 0 var(--space-3);
}
.lv-summary-text:last-child { margin-bottom: 0; }

/* ===== SECTION LABELS ===== */

.lv-section-label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  margin: 0 0 var(--space-4);
}

/* ===== OVERLAY: CHAPTERS TIMELINE ===== */

.lv-chapters { margin-bottom: var(--space-6); }

/* The vertical thread runs down the left through the node dots. */
.lv-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.lv-timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--accent) 30%, transparent),
    color-mix(in srgb, var(--accent) 14%, transparent)
  );
  border-radius: 2px;
}

.lv-chapter {
  position: relative;
  padding: 0 0 var(--space-5) var(--space-5);
}
.lv-chapter:last-child { padding-bottom: 0; }

/* Node dot sitting on the thread. */
.lv-chapter::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  box-sizing: border-box;
}
/* The beginning of the journey gets a filled dot; the "Earlier" rollup a hollow one. */
.lv-chapter--beginning::before { background: var(--accent); border-color: var(--accent); }
.lv-chapter--rollup::before { opacity: 0.6; }

.lv-chapter-month {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin: 0 0 2px;
}
.lv-chapter-line {
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.55;
  margin: 0;
}
.lv-chapter--rollup .lv-chapter-line { color: var(--ink-soft); font-style: italic; }

/* ===== OVERLAY: LESSONS GATHERED ===== */

.lv-lessons { margin-bottom: var(--space-6); }

.lv-lessons-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* Each gathered lesson is a real <button> — tap opens the call it came from. */
.lv-lesson {
  appearance: none;
  text-align: left;
  font: inherit;
  color: inherit;
  width: 100%;
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s, transform 0.1s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.lv-lesson:hover {
  box-shadow: 0 8px 24px rgba(44, 110, 99, 0.12);
  border-left-color: var(--accent);
}
.lv-lesson:active { transform: scale(0.995); }
.lv-lesson:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.lv-lesson-text {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.6;
  margin: 0 0 var(--space-2);
}
.lv-lesson-meta {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.45;
}
.lv-lesson-from { font-style: italic; }

/* Lessons empty / early state — never a guilt trip. */
.lv-lessons-empty {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.65;
  margin: 0;
}

/* ===== OVERLAY: FORWARD CLOSE ===== */

.lv-forward {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}
.lv-forward-star-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
  margin: 0 0 var(--space-1);
}
.lv-forward-star {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.55;
  margin: 0 0 var(--space-4);
}
.lv-close {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.6;
  margin: 0 0 var(--space-3);
}
.lv-transparency {
  font-size: 0.78rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0;
}

/* ===== OVERLAY: THIN / EARLY STATE ===== */
.lv-thin {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.65;
  margin: var(--space-4) 0;
  text-align: center;
}

/* ===== REDUCED-MOTION GUARD ===== */
@media (prefers-reduced-motion: reduce) {
  .lv-entry,
  .lv-entry-arrow,
  .lv-lesson { transition: none; }
}
