/*
 * /guide — Getting Started (Figma 5845:4647 "09 Getting Started").
 * Centered hero, a sticky 01–06 progress pill that follows the step in view
 * (/pages/guide.js), then six alternating step rows with product screenshots.
 * Everything else comes from /v3.css.
 */

/* Skip link (site.css used to style it; not yet in v3.css). */
.skip {
  position: absolute;
  top: 8px;
  left: -9999px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 100px;
  background: var(--k-ink);
  color: #fff;
  font: 600 15px/1.2 var(--k-font-text);
  text-decoration: none;
}

.skip:focus {
  left: 12px;
}

/* v3.css's `.v3 a { color: inherit }` outranks .v3-btn / .v3-link colours;
   restore them until the shared sheet is fixed. */
.v3 .v3-btn {
  color: #fff;
}

.v3 .v3-btn.is-secondary {
  color: var(--k-ink);
}

.v3 .v3-link {
  color: var(--k-green);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* ---------- hero ---------- */
.guide-hero {
  /* Room under the buttons for the progress pill (24 gap + 56 pill) and the
     band's own 112px bottom padding; the pill is pulled up into it. */
  padding-bottom: 192px;
}

.guide-hero .v3-stack {
  gap: 28px;
}

.guide-hero .v3-h1 {
  max-width: 900px;
  font-size: clamp(38px, 4.4vw, 54px);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.guide-hero .v3-lead {
  max-width: 600px;
}

/* ---------- progress ---------- */
/*
 * Zero-height sticky rail: it takes no space in the flow (no layout shift)
 * and the pill hangs from it, first resting at the foot of the hero, then
 * staying under the header while the six steps scroll by.
 */
.guide-progress {
  position: sticky;
  top: 88px;
  z-index: 40;
  display: flex;
  justify-content: center;
  height: 0;
  margin-top: -168px;
  margin-bottom: 168px;
  padding: 0 var(--k-pad);
  pointer-events: none;
}

.guide-progress-list {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 56px;
  margin: 0;
  padding: 8px;
  border: 1px solid rgb(255 255 255 / 90%);
  border-radius: 100px;
  background: var(--k-glass);
  box-shadow: 0 0 16px rgb(0 0 0 / 4%);
  list-style: none;
  pointer-events: auto;
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
}

.guide-progress-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* The connector before every dot but the first. */
.guide-progress-list li + li::before {
  width: 40px;
  height: 2px;
  border-radius: 2px;
  background: var(--k-line);
  content: "";
  transition: background-color var(--k-dur-ui) var(--k-ease);
}

.guide-progress-list li.is-done + li::before,
.guide-progress-list li.is-done + li.is-active::before {
  background: var(--k-green);
}

.guide-dot {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--k-line);
  border-radius: 100px;
  background: #fff;
  color: var(--k-ink-body);
  font: 600 13px/1 var(--k-font-text);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  transition:
    background-color var(--k-dur-ui) var(--k-ease),
    border-color var(--k-dur-ui) var(--k-ease),
    color var(--k-dur-ui) var(--k-ease),
    transform var(--k-dur-press) var(--k-ease);
}

.guide-progress-list li.is-done .guide-dot {
  border-color: var(--k-green-soft);
  background: var(--k-green-soft);
  color: var(--k-green-ink);
}

.guide-dot[aria-current="step"] {
  border-color: var(--k-button);
  background: var(--k-button);
  color: #fff;
}

.guide-dot:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .guide-dot:not([aria-current="step"]):hover {
    border-color: var(--k-ink-3);
    color: var(--k-ink);
  }
}

.guide-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- steps ---------- */
.guide-step {
  padding-top: 96px;
  padding-bottom: 96px;
  /* When jumped to, the step's text lands just below the progress pill. */
  scroll-margin-top: 56px;
}

.guide-step .v3-split {
  grid-template-columns: minmax(0, 500px) minmax(0, 1fr);
}

.guide-step .v3-split.is-flipped {
  grid-template-columns: minmax(0, 1fr) minmax(0, 500px);
}

.guide-copy {
  display: grid;
  justify-items: start;
  gap: 20px;
}

.guide-copy .v3-body {
  max-width: 480px;
}

.guide-num {
  color: var(--k-num);
  font: 700 40px/1 var(--k-font-text);
  font-variant-numeric: tabular-nums;
}

/* The screenshot sits on a soft panel in the opposite band colour. */
.guide-art {
  display: grid;
  place-items: center;
  min-height: 400px;
  padding: 24px;
  overflow: hidden;
  border-radius: 28px;
  background: var(--k-bg-2);
}

.is-grey .guide-art {
  background: var(--k-bg);
}

.guide-art .v3-shot {
  width: min(100%, 560px);
  border-radius: 16px;
}

.guide-art .v3-shot.is-portrait {
  width: min(100%, 300px);
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .guide-dot,
  .guide-progress-list li + li::before {
    transition: none;
  }
}

/* ---------- responsive ---------- */
/* Tablets: share the row evenly so the visual is not squeezed. */
@media (min-width: 961px) and (max-width: 1200px) {
  .guide-step .v3-split,
  .guide-step .v3-split.is-flipped {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 56px;
  }

  .guide-art {
    min-height: 360px;
  }
}

@media (max-width: 960px) {
  .guide-hero {
    padding-bottom: 168px;
  }

  .guide-progress {
    margin-top: -144px;
    margin-bottom: 144px;
  }

  .guide-step {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .guide-step .v3-split,
  .guide-step .v3-split.is-flipped {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .guide-art {
    min-height: 0;
    padding: 32px 20px;
  }
}

@media (max-width: 560px) {
  .guide-progress {
    top: 84px;
  }

  .guide-progress-list {
    gap: 4px;
    height: 48px;
    padding: 6px;
  }

  .guide-progress-list li {
    gap: 4px;
  }

  .guide-progress-list li + li::before {
    width: 12px;
  }

  .guide-dot {
    width: 34px;
    height: 34px;
    font-size: 12px;
  }
}
