/* 08-pages/_overview.css — page composition for the Overview (root) landing page:
   text-first thesis, staged job walkthrough, restrained closing area. */

.p-overview { display: flex; flex-direction: column; gap: clamp(var(--space-2xl), 8vw, 6rem); }
.p-overview__intro { display: flex; flex-direction: column; gap: var(--space-xl); align-items: center; text-align: center; padding-block: clamp(var(--space-xl), 8vw, 6rem) var(--space-lg); }
.p-overview__intro-copy { display: flex; flex-direction: column; gap: var(--space-md); align-items: center; max-width: var(--measure-wide); }
.p-overview__eyebrow {
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}
.p-overview__title {
  color: var(--text-bright);
  font-size: clamp(2.4rem, 1.45rem + 4vw, 5.8rem);
  font-weight: var(--fw-bold);
  line-height: 1;
  letter-spacing: 0;
  max-width: 14ch;
  text-wrap: balance;
}
.p-overview__lead {
  color: var(--text-muted);
  font-size: var(--text-2xl);
  line-height: var(--lh-cell);
  max-width: var(--measure);
  text-wrap: balance;
}
.p-overview__thesis { display: flex; flex-direction: column; gap: var(--space-lg); max-width: var(--measure); }
.p-overview__thesis .c-prose { font-size: var(--text-xl); line-height: var(--lh-cell); text-wrap: balance; }
.p-overview__handoff {
  color: var(--text-bright);
  font-size: var(--text-3xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  text-wrap: balance;
}
.p-overview__demo {
  width: min(100%, 66%);
  margin: 0 auto clamp(4rem, 11vw, 9rem);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.p-overview__demo:focus { outline: none; }
.p-overview__demo:focus-visible .p-overview__demo-frame { outline: 2px solid var(--accent); outline-offset: 3px; }
/* Terminal-window chrome: a titlebar (gantry-tinted dots + label + control) sits
   atop the video, the whole thing bordered like a window. */
.p-overview__demo-frame {
  display: block;
  width: 100%;
  padding: 0;
  border: 2px solid var(--rule);
  border-radius: 4px;
  background: var(--field);
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
  transition: border-color 0.2s ease;
}
.p-overview__demo-frame:hover { border-color: var(--rule-hi); }
.p-overview__demo-frame:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.p-overview__chrome {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.2rem var(--space-sm);
  background: var(--panel);
  border-block-end: 2px solid var(--rule);
}
.p-overview__chrome-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  font-size: var(--text-xs);
  color: var(--gray-muted);
  letter-spacing: 0;
  white-space: nowrap;
}
.p-overview__chrome-mark { color: var(--gray-text); }
.p-overview__chrome-meta { color: var(--gray-text); opacity: 0.7; }

.p-overview__demo-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  background: var(--surface-sunken);
  opacity: 1;
  transition: opacity 0.3s ease;
}
.p-overview__demo-video.is-fading { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .p-overview__demo-video { transition: none; }
}
.p-overview__demo-footer {
  order: 2;
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  margin-top: calc(-1 * var(--space-2xs));
}
.p-overview__demo-caption {
  flex: 1;
  min-width: 0;
  min-height: calc(var(--text-sm) * var(--lh-copy) * 2);
  margin: 0;
  color: var(--text-dim);
  font-size: var(--text-sm);
  line-height: var(--lh-copy);
  text-align: left;
}
.p-overview__demo-caption-link {
  color: inherit;
  text-decoration-color: var(--line-strong);
}
.p-overview__demo-caption-link:hover {
  color: var(--text);
  text-decoration-color: var(--accent);
}
.p-overview__demo-roster {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.p-overview__demo-expand {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.1rem;
  height: 1.1rem;
  color: var(--gray-muted);
  font-size: var(--text-sm);
  line-height: 1;
  transition: color 0.2s ease;
}
.p-overview__demo-frame:hover .p-overview__demo-expand,
.p-overview__demo-frame:focus-visible .p-overview__demo-expand { color: var(--gray-bright); }
.p-overview__demo-nav {
  flex: none;
  display: flex;
  align-items: baseline;
  gap: var(--space-3xs);
  margin: 0;
}
.p-overview__demo-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-muted);
  font-size: var(--text-lg);
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease;
}
.p-overview__demo-step:hover {
  color: var(--text-bright);
}
.p-overview__demo-step:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  color: var(--text-bright);
}
@media (prefers-reduced-motion: reduce) {
  .p-overview__demo-step { transition: none; }
}

/* ── Empty state: the same terminal-chrome shell, inert. No screencasts published yet,
   so the frame is a static div (no zoom, no modal), the slot holds a phosphor "screencast
   pending" poster, and the pagination arrows are present but disabled — the live carousel's
   silhouette, held ready for the first published LoomJob with video. */
.p-overview__demo-frame--static { cursor: default; }
.p-overview__demo-frame--static:hover { border-color: var(--rule); }

.p-overview__demo-poster {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  color: var(--text-dim);
  /* faint scanline wash, tying the empty slot to the CRT texture (mirrors c-videoframe) */
  background:
    repeating-linear-gradient(0deg, transparent 0, transparent 3px, var(--surface-raised) 3px, var(--surface-raised) 4px);
}
.p-overview__demo-poster-glyph {
  font-size: var(--text-3xl);
  line-height: 1;
  color: var(--accent);
  /* subtle phosphor pulse; duration folds --motion-scale, so reduced motion holds it static */
  animation: gantry-videoframe-pulse calc(2.4s * var(--motion-scale)) ease-in-out infinite;
}
.p-overview__demo-poster-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--text-dim);
}
.p-overview__demo-step:disabled {
  color: var(--text-dim);
  opacity: 0.4;
  cursor: default;
}
.p-overview__demo-step:disabled:hover { color: var(--text-dim); }

.p-overview__demo-dialog {
  width: min(92vw, 1400px);
  max-width: 92vw;
  max-height: 90vh;
  margin: auto; /* re-assert dialog centering: the global `* { margin: 0 }` reset clobbers the UA rule */
  padding: 0;
  border: 0;
  background: none;
  overflow: visible;
}
/* the framed terminal window: only the chrome + video carry the border, radius
   and panel background — the caption below sits outside it on the backdrop. */
.p-overview__demo-dialog-window {
  border: 2px solid var(--rule);
  border-radius: 4px;
  background: var(--field);
  overflow: hidden;
}
.p-overview__demo-dialog::backdrop { background: rgba(0, 0, 0, 0.8); }
.p-overview__demo-dialog .p-overview__chrome-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.p-overview__demo-dialog-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: calc(90vh - 5rem);
  object-fit: contain;
  background: var(--surface-sunken);
}
.p-overview__demo-dialog-footer {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  padding: var(--space-xs) 0 0;
}
.p-overview__demo-dialog-nav {
  flex: none;
  display: flex;
  align-items: baseline;
  gap: var(--space-3xs);
}
.p-overview__demo-dialog-caption {
  flex: 1;
  min-width: 0;
  color: var(--text-dim);
  font-size: var(--text-xs);
  line-height: var(--lh-copy);
}
.p-overview__demo-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.1rem;
  height: 1.1rem;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--gray-muted);
  font-size: var(--text-sm);
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.p-overview__demo-close:hover {
  background: rgba(0, 0, 0, 0.85);
  color: var(--gray-bright);
}
.p-overview__demo-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  color: var(--gray-bright);
}

.p-overview__stages { display: flex; flex-direction: column; gap: clamp(4rem, 11vw, 9rem); }

/* larger act typography on the landing page than the shared component default */
.p-overview .c-act__title { font-size: clamp(2.4rem, 1.5rem + 3.2vw, 3.1rem); }
/* clamp every act lead to the intro thesis's effective column (~53ch at this size) and
   let them fill it uniformly — text-wrap: balance would ragged-wrap each to its own width */
.p-overview .c-act__lead { font-size: var(--text-xl); max-width: calc(var(--measure) / 1.4); text-wrap: pretty; }

@media (max-width: 40rem) {
  .p-overview__intro { padding-block-start: var(--space-2xl); }
  .p-overview__lead { font-size: var(--text-lg); }
  .p-overview__demo { width: min(100%, 96%); }
  .p-overview__demo-caption { min-height: calc(var(--text-sm) * var(--lh-copy) * 3); }
}
