/*
 * guide.css — the step-by-step page (como-usar.html, how-to.html). Built on home.css: the
 * header, footer, buttons and type come from there; this file only adds the pickers, the steps
 * and the boxes of text to copy.
 */

.guide-hero {
  padding: 140px 0 40px;
  text-align: center;
}

.guide-hero h1 {
  max-width: 18ch;
  margin: 0 auto 20px;
  font-size: clamp(38px, 5.4vw, 68px);
}

.guide-hero p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--ink-dim);
}

/* ── the two pickers: which agent, which computer ──────────────────────────── */

.pickers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

/* This page has no scroll script to darken the header, so it is solid from the start. */
.bar {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.picker {
  display: flex;
  align-items: center;
  gap: 10px;
}

.picker-label {
  color: var(--ink-faint);
  font-size: 13px;
}

.picker-options {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel);
}

.picker-options button {
  padding: 8px 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-dim);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
}

.picker-options button[aria-pressed="true"] {
  background: var(--accent);
  color: #111;
  font-weight: 600;
}

/* Only what matches both choices is shown. */
[data-for-agent][hidden],
[data-for-os][hidden] {
  display: none !important;
}

/* ── the steps ─────────────────────────────────────────────────────────────── */

.steps {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 0 40px;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 0 0 52px 76px;
  counter-increment: step;
}

.step::before {
  content: counter(step);
  position: absolute;
  top: -2px;
  left: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #111;
  font-weight: 700;
  font-size: 18px;
}

.step::after {
  content: "";
  position: absolute;
  top: 52px;
  bottom: 8px;
  left: 21px;
  width: 2px;
  background: var(--line);
}

.step:last-child::after {
  display: none;
}

.step h2 {
  margin-bottom: 12px;
  font-size: clamp(22px, 2.4vw, 28px);
}

.step p,
.step li {
  color: var(--ink-dim);
}

.step p + p,
.step p + ul,
.step ul + p {
  margin-top: 12px;
}

.step ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 20px;
}

.step b,
.step strong {
  color: var(--ink);
}

kbd {
  padding: 2px 7px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.85em;
}

.ui {
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--panel-3);
  color: var(--ink);
  font-size: 0.92em;
  white-space: nowrap;
}

.step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* ── text to copy ──────────────────────────────────────────────────────────── */

.copy-box {
  position: relative;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #0d0d10;
}

.copy-box pre {
  margin: 0;
  padding: 18px 120px 18px 18px;
  overflow-x: auto;
  color: #e9e6df;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.copy-box.prompt pre {
  font-family: inherit;
  font-size: 16px;
}

.copy-box button {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel-2, var(--panel));
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.copy-box button.copied {
  border-color: var(--accent);
  color: var(--accent);
}

.note {
  margin-top: 14px;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: var(--panel);
  color: var(--ink-dim);
  font-size: 15px;
}

.guide-end {
  padding: 20px 0 110px;
  text-align: center;
}

.guide-end h2 {
  margin-bottom: 14px;
}

.guide-end p {
  max-width: 560px;
  margin: 0 auto 24px;
  color: var(--ink-dim);
}

@media (max-width: 620px) {
  .guide-hero {
    padding-top: 112px;
  }
  .pickers {
    gap: 10px;
  }
  .picker {
    flex-direction: column;
    gap: 6px;
  }
  .step {
    padding-left: 58px;
  }
  .step::before {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
  .step::after {
    left: 18px;
    top: 46px;
  }
  .copy-box pre {
    padding-right: 18px;
    padding-top: 52px;
  }
}

/* ── screenshots of the app ─────────────────────────────────────────────────── */

.shot {
  max-width: 600px;
  margin: 16px 0;
}

.shot.wide {
  max-width: 100%;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 24px 60px -30px rgb(0 0 0 / 0.9);
}

.shot figcaption {
  margin-top: 8px;
  color: var(--ink-faint);
  font-size: 13px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 10px;
  font-size: 15px;
}

.links a {
  color: var(--accent);
  text-decoration: none;
}

.links a:hover {
  text-decoration: underline;
}

.term-how {
  font-size: 15px;
}

/* Where to click: an arrow whose tip sits on the spot. */
.shot-frame {
  position: relative;
}

.tap {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

.tap::after {
  content: "";
  position: absolute;
  top: -5px;
  left: -5px;
  width: 44px;
  height: 44px;
  background:
    no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M6 6 L6 30 L13 23 L24 42 L31 38 L20 19 L30 19 Z' fill='%23ff7a1a' stroke='%23111' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E");
  filter: drop-shadow(0 3px 6px rgb(0 0 0 / 0.6));
  animation: tap-nudge 1.6s ease-in-out infinite;
}

@keyframes tap-nudge {
  50% {
    transform: translate(6px, 6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tap::after {
    animation: none;
  }
}
