/* ==========================================================================
   Section 8 — Mission and vision (wording fixed by leadership)
   "The horizon" — a quiet pause before the contact form.
       ┌─────────────┬──────────────────┐
       │             │ OUR VISION       │  row 1  destination, a touch lighter
       │ OUR MISSION ┆ (dotted riser)   │  row 2  the work today
       ●━━━━━━━━━━━━━●━━━━━━━━━━━━━━━━━━━  row 3  the horizon
   Once on reveal (.is-visible from reveal.js): the horizon fills and a dot
   travels from the mission to beneath the vision (1.1s), the dotted riser
   climbs to the vision (0.5s), and the vision comes fully into view.
   Base styles are the final state (no JS / reduced motion: all shown).
   Previous version: backups/mission.v1-columns.css
   Prefixed .mv- and scoped to .mission.
   ========================================================================== */

.mission {
  position: relative;
  padding: clamp(72px, 8vw, 112px) var(--page-px);
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.mv-inner {
  max-width: var(--container);
  margin: 0 auto;
}

/* ─── Stage ───────────────────────────────────────────────────────────── */
.mv-stage {
  --mv-gap: clamp(40px, 6vw, 96px);
  --mv-to: calc(50% + var(--mv-gap) / 2 + 5px);   /* x of the riser on the horizon */
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--mv-gap);
}
.mv-item { margin: 0; }
.mv-vision { grid-column: 2; grid-row: 1; padding-bottom: 32px; }
.mv-missn  { grid-column: 1; grid-row: 2; align-self: end; }

.mv-label {
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-text);
}
.mv-quote {
  margin: 0;
  max-width: 36ch;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.1vw, 28px);
  font-weight: 500;
  line-height: 1.42;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-wrap: balance;
}
/* The destination reads a step lighter than today's work */
.mv-vision .mv-quote { color: var(--text-secondary); }
.mv-keep { white-space: nowrap; }

/* Dotted riser: from the horizon up to the vision */
.mv-riser {
  grid-column: 2;
  grid-row: 2;
  justify-self: start;
  width: 2px;
  margin-left: 4px;
  margin-bottom: -28px;              /* reach down onto the horizon */
  background-image: repeating-linear-gradient(to bottom, var(--accent) 0 3px, transparent 3px 8px);
  opacity: 0.7;
}

/* The horizon */
.mv-horizon {
  grid-column: 1 / -1;
  grid-row: 3;
  position: relative;
  height: 1px;
  margin-top: 28px;
  background: var(--border-strong);
}
/* travelled part */
.mv-horizon::before {
  content: '';
  position: absolute;
  left: 0; top: -0.5px;
  width: var(--mv-to);
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}
/* start point, under the mission */
.mv-horizon::after {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
}
.mv-dot {
  position: absolute;
  left: var(--mv-to); top: 50%;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  transform: translate(-50%, -50%);
}

.mv-actions { margin-top: clamp(36px, 4vw, 52px); }

/* ─── One play on reveal ──────────────────────────────────────────────── */
.mv-horizon::before { transition: width 1.1s cubic-bezier(0.65, 0, 0.35, 1) 0.4s; }
.mv-dot             { transition: left 1.1s cubic-bezier(0.65, 0, 0.35, 1) 0.4s; }
.mv-riser           { transition: clip-path 0.5s var(--ease-out) 1.5s; clip-path: inset(0 -2px 0 -2px); }
.mv-vision          { transition: opacity 0.5s ease-out 1.85s, transform 0.6s var(--ease-out) 1.85s; }

html.has-js .mv-stage:not(.is-visible) .mv-horizon::before { width: 0; }
html.has-js .mv-stage:not(.is-visible) .mv-dot             { left: 0; }
html.has-js .mv-stage:not(.is-visible) .mv-riser           { clip-path: inset(100% -2px 0 -2px); }
html.has-js .mv-stage:not(.is-visible) .mv-vision          { opacity: 0.35; transform: translateY(6px); }

/* ─── Responsive: destination above, today below, horizon under both ─── */
@media (max-width: 860px) {
  .mv-stage {
    --mv-to: 5px;
    grid-template-columns: minmax(0, 1fr);
  }
  .mv-vision { grid-column: 1; grid-row: 1; padding-bottom: 0; }
  .mv-riser  { grid-column: 1; grid-row: 2; height: 48px; margin: 14px 0 14px 4px; }
  .mv-missn  { grid-column: 1; grid-row: 3; }
  .mv-horizon { grid-row: 4; }
}

@media (prefers-reduced-motion: reduce) {
  .mv-horizon::before, .mv-dot, .mv-riser, .mv-vision { transition: none; }
}
