/* ── Demos — shared styles for the demo index and each walkthrough.
   Reuses home.css tokens only: --ink/-2/-3, --paper/-2, --line,
   --accent/--accent-ink, --display/--body/--mono. One accent.

   Each walkthrough is a narrated video with a chapter rail. The older
   screen-by-screen deck (.deck/.slide/.frame/.dots/.lb) has been retired. ── */

/* ── intro ─────────────────────────────────────────── */
.dm-intro { padding: 40px 0 0; }
.dm-intro h1 { max-width: 15em; font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.dm-intro .lead { margin-top: 14px; font-size: 1rem; }
.dm-meta { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 18px; }
.dm-meta span { font-family: var(--mono); font-size: 0.74rem; color: var(--ink-3); }

/* back-link to the demo index */
.dm-back {
    display: inline-flex; align-items: center; gap: 7px;
    font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--ink-3); margin-bottom: 20px;
    transition: color 0.15s ease;
}
.dm-back:hover { color: var(--ink); }

/* ── player ────────────────────────────────────────── */
.vid { padding: 28px 0 88px; }

/* the video sits in the same framed, height-capped stage the screenshots used,
   so a 16:9 recording never runs off-screen on a short viewport */
.vid-stage {
    border: 1px solid var(--line); border-radius: 12px;
    background: #11151b; overflow: hidden;
    box-shadow: 0 1px 2px rgba(14, 17, 22, 0.04), 0 14px 36px -14px rgba(14, 17, 22, 0.18);
}
.vid-stage video {
    display: block; width: 100%; height: auto;
    max-height: calc(100vh - 150px);
    background: #11151b;
}

/* chapter rail — one row per chapter, click to seek. Mono timecodes are
   tabular so the titles line up in a column regardless of timecode width. */
.vid-chapters { margin-top: 26px; }
.vid-chapters-label {
    font-family: var(--mono); font-size: 0.68rem; font-weight: 500;
    letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3);
    margin-bottom: 12px;
}
/* chapters are sequential, so they read as a single ordered column rather than
   a grid that would wrap mid-sequence; width-capped so the rows stay scannable */
.vid-chapter-list {
    display: flex; flex-direction: column; gap: 2px;
    max-width: 46em;
}
.vid-chapter {
    display: flex; align-items: baseline; gap: 12px; width: 100%;
    padding: 11px 14px; text-align: left;
    font-family: var(--body); font-size: 0.92rem; color: var(--ink-2);
    background: none; border: 1px solid transparent; border-radius: 9px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.vid-chapter:hover { background: var(--paper-2); border-color: var(--line); color: var(--ink); }
.vid-chapter:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vid-chapter-time {
    font-family: var(--mono); font-size: 0.78rem; color: var(--ink-3);
    font-variant-numeric: tabular-nums; flex: none;
}
/* the chapter the playhead is currently inside */
.vid-chapter.is-on {
    background: var(--paper-2); border-color: var(--line); color: var(--ink); font-weight: 500;
}
.vid-chapter.is-on .vid-chapter-time { color: var(--accent-ink); }

/* ── summary ───────────────────────────────────────── */
.yield { padding: 84px 0; border-top: 1px solid var(--line); background: var(--paper-2); }
.yield-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
    gap: 16px; margin-top: 36px;
}
.yield-card {
    border: 1px solid var(--line); border-radius: 12px; background: var(--paper);
    padding: 24px 24px 22px;
}
.yield-card h3 { color: var(--ink); }
.yield-card p { font-size: 0.95rem; color: var(--ink-2); line-height: 1.6; margin-top: 10px; }
.dm-footnote {
    font-size: 0.9rem; color: var(--ink-3);
    border-top: 1px solid var(--line);
    margin-top: 40px; padding-top: 22px; max-width: 54em;
}
.dm-footnote strong { color: var(--ink-2); font-weight: 600; }

/* ── demo index — compact card per walkthrough ─────── */
.dm-list { padding: 40px 0 96px; }
/* four demos: a fixed 2×2 at desktop rather than auto-fit, which would land
   3 + 1 and leave a hole in the second row */
.dm-cards { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 860px) {
    .dm-cards { grid-template-columns: 1fr 1fr; }
}
.dm-card {
    display: flex; flex-direction: column;
    border: 1px solid var(--line); border-radius: 12px;
    background: var(--paper); padding: 22px 24px 20px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}
.dm-card:hover {
    border-color: var(--ink-3);
    box-shadow: 0 1px 2px rgba(14, 17, 22, 0.04), 0 12px 30px -16px rgba(14, 17, 22, 0.2);
    transform: translateY(-2px);
}
.dm-card-kind {
    font-family: var(--mono); font-size: 0.68rem; font-weight: 500;
    letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink);
}
.dm-card-name {
    font-family: var(--display); font-weight: 600; font-size: 1.16rem;
    line-height: 1.24; letter-spacing: -0.01em; color: var(--ink); margin-top: 8px;
    display: flex; align-items: baseline; gap: 8px;
}
.dm-card-name::after {
    content: "→"; margin-left: auto; color: var(--ink-3); font-weight: 400;
    transition: transform 0.15s ease, color 0.15s ease;
}
.dm-card:hover .dm-card-name::after { color: var(--ink); transform: translateX(3px); }
.dm-card-desc {
    font-size: 0.94rem; color: var(--ink-2); line-height: 1.55; margin-top: 9px;
}
.dm-card-sub {
    font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3);
    border-top: 1px solid var(--line); margin-top: 16px; padding-top: 13px;
}

@media (max-width: 760px) {
    .vid-stage video { max-height: calc(100vh - 120px); }
    .dm-cards { grid-template-columns: 1fr; }
}
