/*
 * Real product screens: the window frame (bar with the console route, the capture, a caption), light/dark capture
 * switching, numbered callout marks, and the inner-page figure. Shared by the home page, inner pages and the tour.
 */
.window {
  position: relative;
  margin: 0;
  border: 1px solid var(--win-line, var(--line-strong));
  border-radius: 12px;
  background: var(--win-bg, var(--surface));
  box-shadow:
    0 1px 0 rgb(255 255 255 / 5%) inset,
    0 2px 4px rgb(6 10 17 / 8%),
    0 24px 60px -20px rgb(6 10 17 / 35%);
  overflow: hidden;
  isolation: isolate;
}

:root[data-theme='dark'] .window {
  --win-line: #263247;
  --win-bg: #0d131d;
  box-shadow:
    0 1px 0 rgb(255 255 255 / 6%) inset,
    0 30px 80px -24px rgb(0 0 0 / 75%),
    0 0 0 1px rgb(142 176 255 / 6%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .window {
    --win-line: #263247;
    --win-bg: #0d131d;
    box-shadow:
      0 1px 0 rgb(255 255 255 / 6%) inset,
      0 30px 80px -24px rgb(0 0 0 / 75%),
      0 0 0 1px rgb(142 176 255 / 6%);
  }
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--win-line, var(--line));
  background: color-mix(in srgb, var(--win-bg, var(--surface)) 82%, var(--text) 4%);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.window-dots {
  display: inline-flex;
  gap: 6px;
  flex: none;
}

.window-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-strong);
}

.window-path {
  flex: 1;
  min-width: 0;
  max-width: 340px;
  margin-inline: auto;
  padding: 3px 12px;
  border: 1px solid var(--win-line, var(--line));
  border-radius: 6px;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.window-tag {
  flex: none;
  color: var(--warn);
  font-family: var(--font-sans);
  font-weight: 600;
}

.window-caption {
  padding: 10px 16px;
  border-top: 1px solid var(--win-line, var(--line));
  color: var(--muted);
  font-size: 0.8125rem;
}

@media (max-width: 640px) {
  .window-tag {
    display: none;
  }

  .window-path {
    margin-inline-start: 0;
    text-align: start;
  }
}

/* ---------- captures: light and dark, CSS shows the one matching the theme ---------- */
.screen-media {
  position: relative;
}

.shot {
  width: 100%;
}

.shot-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .shot-dark {
    display: block;
  }

  :root:not([data-theme='light']) .screen-media:has(.shot-dark) .shot-light {
    display: none;
  }
}

:root[data-theme='dark'] .shot-dark {
  display: block;
}

:root[data-theme='dark'] .screen-media:has(.shot-dark) .shot-light {
  display: none;
}

.screen-note {
  padding: 6px 14px 0;
  color: var(--faint);
  font-size: 0.8125rem;
}

.window .screen-note {
  padding: 8px 16px;
  border-top: 1px solid var(--win-line, var(--line));
}

/* ---------- numbered callouts on a screen ---------- */
.marks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.mark-halo {
  fill: rgb(29 71 196 / 22%);
}

.mark-dot {
  fill: #1d47c4;
  stroke: #ffffff;
  stroke-width: 3;
}

.marks text {
  fill: #ffffff;
  font-family: var(--font-mono);
  font-weight: 700;
}

@media (prefers-reduced-motion: no-preference) {
  .mark-halo {
    transform-box: fill-box;
    transform-origin: center;
    animation: halo 2.4s var(--ease) infinite;
  }

  .mark:nth-child(2) .mark-halo {
    animation-delay: 0.4s;
  }

  .mark:nth-child(3) .mark-halo {
    animation-delay: 0.8s;
  }
}

@keyframes halo {
  0%,
  100% {
    transform: scale(0.85);
    opacity: 1;
  }

  50% {
    transform: scale(1.25);
    opacity: 0.45;
  }
}

/* ---------- inner pages: a captured screen as a figure ---------- */
.page-figure {
  margin: 0;
}

.frame-screen {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.synthetic-tag {
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.8125rem;
}
