/* ═══════════════════════════════════════════════════
   Journey — Four chapters, scene breaks, endpaper arc
   Portfolio v3 · 2026
   Treat chapters as chapters of a book. Geography lives
   in a dateline. The arc appears after — as an endpaper.
   ═══════════════════════════════════════════════════ */

.journey {
  background: var(--surface-experience);
  padding: clamp(8rem, 14vh, 12rem) clamp(1.5rem, 5vw, 5rem);
  position: relative;
}

.journey__inner {
  max-width: 900px;
  margin: 0 auto;
}

/* ═══ Header ═══ */
.journey__header {
  text-align: center;
  margin-bottom: clamp(4rem, 8vh, 6rem);
}

.journey__eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-faint);
}

.journey__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  margin: 0;
}

.journey__title em {
  font-style: italic;
  color: var(--accent);
}

/* ═══ Journey intro — frames the arc before the chapters ═══ */
.journey__intro {
  max-width: 640px;
  margin: 0 auto clamp(3.5rem, 7vh, 5.5rem);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.05rem, 1.55vw, 1.25rem);
  line-height: 1.65;
  color: var(--text-secondary);
  text-wrap: pretty;
  border-left: 1px solid var(--border-faint);
  padding-left: 1.5rem;
}

.journey__intro em {
  color: var(--text-primary);
  font-style: italic;
}

/* ═══ Trust line — one-line reframe per chapter ═══ */
.journey__chapter-trust {
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  font-style: normal;
  line-height: 1.4;
  color: var(--text-muted);
  margin: 0 0 1.1rem;
  letter-spacing: 0.01em;
}

.journey__trust-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-right: 0.3em;
}

.journey__chapter-trust em {
  font-style: italic;
  color: var(--text-secondary);
  font-family: var(--font-display);
}

.journey__chapter--current .journey__chapter-trust em {
  color: var(--accent);
}

/* ═══ Chapters — plain vertical stack, separated by scene breaks ═══ */
.journey__chapters {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.journey__chapter {
  max-width: 640px;
  margin: 0 auto;
  padding: 0;
  position: relative;
}

/* ═══ Folio — Roman numeral in the margin (like a book page) ═══ */
.journey__folio {
  position: absolute;
  top: 0.1em;
  left: -3.25rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1;
  color: var(--text-faint);
  letter-spacing: 0.02em;
  user-select: none;
}

.journey__folio em {
  font-style: italic;
}

.journey__chapter--current .journey__folio {
  color: var(--accent);
}

/* ═══ Company name — the chapter headline ═══ */
.journey__chapter-company {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

/* ═══ Role ═══ */
.journey__chapter-role {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.35;
  color: var(--text-secondary);
  margin: 0 0 1.4rem;
}

.journey__chapter-role strong {
  color: var(--text-primary);
  font-weight: 500;
  font-style: italic;
}

.journey__chapter--current .journey__chapter-role strong {
  color: var(--accent);
}

/* ═══ Essence — italic serif prose, opened by a dateline ═══ */
.journey__chapter-essence {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.05rem, 1.55vw, 1.25rem);
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
  margin: 0;
  max-width: 52ch;
  text-wrap: pretty;
}

.journey__chapter-essence em {
  font-style: italic;
  color: var(--text-primary);
  font-weight: 500;
}

/* ═══ Reading mode — cream only. Same prose, room to breathe. ═══ */
[data-theme="light"] .journey__chapter-essence {
  font-size: clamp(1.1rem, 1.65vw, 1.32rem);
  line-height: 1.7;
  max-width: 62ch;
}

.journey__chapter--current .journey__chapter-essence em {
  color: var(--accent);
}

/* ═══ Dateline — place + year opener, mono voice breaks the italic ═══ */
.journey__dateline {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  /* lift slightly to align optically with the italic serif baseline */
  position: relative;
  top: -0.12em;
}

.journey__chapter--current .journey__dateline {
  color: var(--accent);
}

/* ═══ Scene break — three dots, widely tracked, editorial pause ═══ */
.journey__break {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.4em;
  padding: clamp(2.5rem, 5vh, 4rem) 0;
  color: var(--text-faint);
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1;
  opacity: 0.55;
  user-select: none;
}

.journey__break span {
  display: inline-block;
}

/* ═══ Endpaper — the arc, revealed after the chapters ═══ */
.journey__endpaper {
  margin: clamp(5rem, 10vh, 8rem) auto 0;
  max-width: 220px;
  text-align: center;
  padding: 0;
}

.journey__endpaper-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  opacity: 0.62;
}

.journey__endpaper-caption {
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.journey__endpaper-caption em {
  font-style: italic;
}

/* ═══ SVG arc — line, nodes, labels ═══ */
.journey__path-line {
  fill: none;
  stroke: var(--text-primary);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.55;
}

.journey__path-node {
  fill: var(--text-primary);
  r: 4;
  opacity: 0.8;
  transform-box: fill-box;
  transform-origin: center;
  animation: journey-heartbeat 2.4s ease-in-out infinite;
}

.journey__path-node:nth-of-type(2) { animation-delay: 0.6s; }
.journey__path-node:nth-of-type(3) { animation-delay: 1.2s; }
.journey__path-node:nth-of-type(4) { animation-delay: 1.8s; }

.journey__path-node--current {
  fill: var(--accent);
}

@keyframes journey-heartbeat {
  0%, 100% { opacity: 0.55; r: 4;   }
  50%       { opacity: 1;    r: 5.2; }
}

@media (prefers-reduced-motion: reduce) {
  .journey__path-node {
    animation: none;
    opacity: 0.85;
  }
  .journey__path-node--current { opacity: 1; }
}

.journey__path-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  fill: var(--text-muted);
  opacity: 0.7;
}

/* ═══ Responsive ═══ */
@media (max-width: 900px) {
  /* Folio drops into the flow on narrower screens */
  .journey__folio {
    position: static;
    display: block;
    margin-bottom: 0.6rem;
    color: var(--text-muted);
    font-size: 1.25rem;
  }
}

@media (max-width: 600px) {
  .journey {
    padding: 4rem 1.25rem;
  }
  .journey__title {
    font-size: clamp(2rem, 9vw, 3rem);
  }
  .journey__chapter-company {
    font-size: clamp(1.75rem, 7vw, 2.4rem);
  }
  .journey__dateline {
    white-space: normal;
    display: inline;
  }
  .journey__endpaper {
    max-width: 170px;
  }
  .journey__intro {
    font-size: clamp(0.95rem, 3.5vw, 1.1rem);
    padding-left: 1rem;
    margin-bottom: 2.5rem;
  }
  .journey__chapter-trust {
    font-size: 0.82rem;
  }
  .journey__trust-label {
    font-size: 0.6rem;
  }
}

/* ═══════════════════════════════════════════════════
   LOGBOOK — The Formation
   Dossier → Logbook transition, outdented stamps,
   first-person monologue, passport datelines
   ═══════════════════════════════════════════════════ */

/* Transition marker */
.journey__shift {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.journey__shift-label,
.journey__shift-note {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
  opacity: 0.5;
}

.journey__shift-rule {
  flex: 1;
  height: 1px;
  background: var(--border-faint);
}

/* Log entries — outdented stamp, inset monologue */
.journey__log {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.journey__entry {
  display: grid;
  grid-template-columns: clamp(6rem, 12vw, 10rem) 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: 2.5rem 0;
  border-bottom: 1px solid rgba(var(--text-primary-rgb, 242 232 212) / 0.05);
}

.journey__entry:last-child { border-bottom: none; }

/* Passport stamp — sits in left margin */
.journey__stamp {
  position: sticky;
  top: 2rem;
  align-self: start;
}

.journey__stamp-location {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.2rem;
}

/* Year as large italic serif — marginalia note feel */
.journey__stamp-year {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.8rem;
  color: var(--text-faint);
  line-height: 1;
  display: block;
  margin-bottom: 0.4rem;
  opacity: 0.5;
}

.journey__stamp-title {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.55;
  line-height: 1.5;
}

/* Monologue — first-person, stays in central column */
.journey__monologue {
  padding-top: 0.25rem;
}

.journey__belief-seed {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.45;
  margin-bottom: 0.85rem;
}

/* Voice — the internal monologue */
.journey__voice {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  line-height: 1.75;
  letter-spacing: -0.005em;
  max-width: 50ch;
}

.journey__voice em {
  color: var(--text-primary);
  font-style: italic;
}

/* Current entry — Microsoft, convergence */
.journey__entry--current .journey__stamp-year {
  color: var(--accent);
  opacity: 0.7;
}

.journey__entry--current .journey__voice {
  color: var(--text-primary);
  opacity: 0.85;
}

/* Marginalia stamp — ENTRY_END mark at bottom of section */
.journey__inner::after {
  content: "ENTRY_END // SOURCE: ARCHIVE_CHALLA";
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: var(--text-faint);
  opacity: 0.18;
  display: block;
  text-align: right;
  margin-top: 4rem;
  letter-spacing: 0.3em;
}

/* Mobile */
@media (max-width: 600px) {
  .journey__entry {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .journey__stamp {
    position: static;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .journey__stamp-year {
    font-size: 1.2rem;
    margin-bottom: 0;
  }

  .journey__stamp-title { display: none; }

  .journey__belief-seed {
    font-size: 0.62rem;
    opacity: 0.6;
    letter-spacing: 0.12em;
  }

  .journey__voice {
    font-size: clamp(0.95rem, 4vw, 1.05rem);
    max-width: 100%;
  }

  /* Shift bar — hide note on very small screens to prevent overflow */
  .journey__shift-note {
    display: none;
  }

  /* Marginalia — tighten letter-spacing to prevent overflow */
  .journey__inner::after {
    letter-spacing: 0.12em;
    font-size: 0.48rem;
    text-align: center;
  }
}
