/* Hero demo loop styles
 * Goal: looks at home next to the warm, serif-led brand. Off-white frame,
 * thin rules, mono labels, single accent green. The demo's job is to feel
 * like a sequence of small native UIs (Stripe → eBay → Claude) — not flashy.
 */

#hero-demo-root {
  margin-top: 56px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
  box-shadow:
    0 1px 0 rgba(0,0,0,.02),
    0 24px 48px -24px rgba(60, 50, 30, .12);
  overflow: hidden;
}

/* shared "browser" chrome */
.hd-chrome {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}
.hd-dots { display: flex; gap: 6px; }
.hd-dots i {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--line-2);
  display: block;
}
.hd-tab {
  margin-left: 8px;
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-2);
  transition: all .35s ease;
}
.hd-url { margin-left: auto; opacity: .8; }

/* stage */
.hd-stage {
  position: relative;
  height: 460px;
  background: var(--bg);
  overflow: hidden;
}

/* every scene fills the stage */
.scene {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  animation: scene-in .35s ease both;
}
@keyframes scene-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* caption pill (top-left) */
.hd-caption {
  position: absolute;
  top: 16px; left: 16px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 10px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  z-index: 5;
  animation: cap-in .4s ease both;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,.25);
}
@keyframes cap-in {
  from { opacity: 0; transform: translateY(-4px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.hd-caption-num {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px;
  background: var(--accent);
  color: var(--ink);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}

/* progress dots (bottom-center) */
.hd-progress {
  position: absolute;
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 6px;
  z-index: 4;
}
.hd-progress-dot {
  width: 28px; height: 4px;
  background: color-mix(in oklab, var(--ink) 8%, transparent);
  border-radius: 2px;
  overflow: hidden;
  display: block;
}
.hd-progress-dot i {
  display: block;
  height: 100%;
  background: var(--ink);
  transition: width .15s linear;
}

/* ─── Scene 1: Stripe ─────────────────────────────────────────────────── */
.scene-signup {
  background:
    radial-gradient(ellipse at top, oklch(0.97 0.012 80), var(--bg) 60%);
}
.stripe-card {
  width: 360px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 26px 22px;
  box-shadow: 0 12px 28px -12px rgba(40, 30, 20, .15);
  font-size: 14px;
}
.stripe-row { display: flex; align-items: center; justify-content: space-between; }
.stripe-head { margin-bottom: 4px; }
.stripe-brand {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.01em;
}
.stripe-amount {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--ink);
}
.stripe-amount span { color: var(--ink-3); font-size: 12px; }
.stripe-trial {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 22px;
}
.stripe-field { margin-bottom: 14px; flex: 1; }
.stripe-field label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  margin-bottom: 5px;
  letter-spacing: 0.02em;
}
.stripe-input {
  display: flex; align-items: center; gap: 8px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  position: relative;
}
.stripe-input.ghost { color: var(--ink-3); }
.stripe-typed { white-space: nowrap; }
.stripe-caret {
  display: inline-block;
  width: 1.5px; height: 16px;
  background: var(--ink);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}
.stripe-cardicon {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: oklch(0.45 0.16 260);
  letter-spacing: 0.06em;
}
.stripe-tworow { gap: 12px; align-items: stretch; }
.stripe-tworow .stripe-field { margin-bottom: 0; }
.stripe-btn {
  width: 100%;
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
  border-radius: 8px;
  font: inherit;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.stripe-btn.pulse {
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 50%, transparent);
  animation: btn-pulse 1.2s ease-out infinite;
}
@keyframes btn-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 50%, transparent); }
  70%  { box-shadow: 0 0 0 12px color-mix(in oklab, var(--accent) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 0%, transparent); }
}
.stripe-btn.clicked { transform: scale(0.97); }
.stripe-foot {
  margin-top: 14px;
  text-align: center;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
}
.stripe-foot b { color: oklch(0.55 0.18 280); font-weight: 600; }

/* ─── Scene 2: eBay OAuth ─────────────────────────────────────────────── */
.scene-oauth {
  background: oklch(0.99 0.005 220);
}
.ebay-card {
  width: 380px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 12px 28px -12px rgba(40, 30, 20, .15);
}
.ebay-logo {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-style: italic;
  margin-bottom: 16px;
}
.ebay-h {
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.ebay-p {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 0 0 18px;
}
.ebay-scopes {
  list-style: none; padding: 0; margin: 0 0 22px;
  display: flex; flex-direction: column; gap: 8px;
}
.ebay-scopes li {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
  color: var(--ink-2);
}
.ebay-check {
  display: inline-grid; place-items: center;
  width: 16px; height: 16px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  flex: none;
}
.ebay-actions {
  display: flex; gap: 10px;
}
.ebay-btn-secondary,
.ebay-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: transform .15s ease;
}
.ebay-btn-secondary {
  background: var(--bg);
  border: 1px solid var(--line-2);
  color: var(--ink-2);
}
.ebay-btn {
  background: oklch(0.50 0.18 255);
  border: 1px solid oklch(0.50 0.18 255);
  color: white;
}
.ebay-btn.pulse {
  box-shadow: 0 0 0 0 oklch(0.50 0.18 255 / 0.5);
  animation: btn-pulse-blue 1.2s ease-out infinite;
}
@keyframes btn-pulse-blue {
  0%   { box-shadow: 0 0 0 0 oklch(0.50 0.18 255 / 0.5); }
  70%  { box-shadow: 0 0 0 12px oklch(0.50 0.18 255 / 0); }
  100% { box-shadow: 0 0 0 0 oklch(0.50 0.18 255 / 0); }
}
.ebay-btn.clicked { transform: scale(0.97); }

/* ─── Scene 3: Claude connector settings ──────────────────────────────── */
.scene-connect {
  background: oklch(0.985 0.008 60);
}
.claude-settings {
  width: 420px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
  box-shadow: 0 12px 28px -12px rgba(40, 30, 20, .15);
}
.cs-h {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.cs-sub {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 18px;
}
.cs-field { margin-bottom: 14px; }
.cs-field label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  margin-bottom: 5px;
}
.cs-input {
  position: relative;
  display: flex; align-items: center;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  background: var(--bg);
}
.cs-ph { color: var(--ink-3); }
.cs-pasted {
  animation: pasted-pop .3s ease both;
}
@keyframes pasted-pop {
  from { opacity: 0; transform: translateX(-4px); }
  to   { opacity: 1; transform: translateX(0); }
}
.cs-paste-flash {
  position: absolute;
  right: 10px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 3px 7px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity .15s ease;
}
.cs-paste-flash.on { opacity: 1; }

.cs-detected {
  margin: 8px 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-2);
  transition: opacity .35s ease;
}
.cs-detected-name {
  display: flex; align-items: center; gap: 8px;
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 4px;
}
.cs-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 18%, transparent);
}
.cs-detected-desc {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
}
.cs-actions {
  display: flex; gap: 10px;
}
.cs-btn-secondary,
.cs-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: transform .15s ease;
}
.cs-btn-secondary {
  background: var(--bg);
  border: 1px solid var(--line-2);
  color: var(--ink-2);
}
.cs-btn {
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
}
.cs-btn.pulse {
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 50%, transparent);
  animation: btn-pulse 1.2s ease-out infinite;
}
.cs-btn.clicked { transform: scale(0.97); }

/* ─── Claude frame (used in scenes 4–6) ──────────────────────────────── */
.claude-frame {
  width: 100%;
  max-width: 760px;
  height: 100%;
  display: grid;
  grid-template-columns: 140px 1fr;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  overflow: hidden;
  box-shadow: 0 12px 28px -12px rgba(40, 30, 20, .15);
}
.cf-side {
  background: oklch(0.97 0.01 60);
  border-right: 1px solid var(--line);
  padding: 16px 12px;
  display: flex; flex-direction: column;
  gap: 12px;
}
.cf-side-logo {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  background: oklch(0.95 0.04 50);
  color: oklch(0.42 0.14 45);
  border: 1px solid oklch(0.88 0.05 50);
  border-radius: 6px;
  font-size: 13px;
}
.cf-side-pill {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  padding: 6px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.cf-side-spacer { flex: 1; }
.cf-side-conn {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  padding: 6px 8px;
  border-top: 1px solid var(--line);
  margin: 0 -12px -16px;
  padding-bottom: 14px; padding-top: 12px;
  padding-left: 12px;
}
.cf-conn-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 25%, transparent);
}
.cf-main {
  padding: 24px 28px;
  display: flex; flex-direction: column;
  gap: 16px;
  overflow: hidden;
  position: relative;
}

/* Empty state shown in scene 4 */
.claude-empty {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
}
.claude-greeting {
  font-family: var(--serif);
  font-size: 32px;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.claude-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
}
.claude-sub b { color: var(--accent-ink); font-weight: 500; }

/* Composer */
.claude-composer {
  display: flex; align-items: center; gap: 8px;
  margin-top: auto;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--bg);
}
.cc-input {
  flex: 1;
  font-size: 14px;
  color: var(--ink);
  display: flex; align-items: center;
  min-height: 22px;
  white-space: nowrap;
  overflow: hidden;
}
.cc-caret {
  display: inline-block;
  width: 1.5px; height: 16px;
  background: var(--ink);
  margin-left: 1px;
  animation: blink 1s steps(1) infinite;
}
.cc-send {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--ink);
  color: var(--bg);
  display: grid; place-items: center;
  cursor: pointer;
  flex: none;
  transition: transform .15s ease, background .15s ease;
}
.cc-send.sending {
  background: var(--accent);
  transform: scale(1.08);
}

/* Chat-thread variant (scenes 5 & 6) */
.claude-frame.compact .cf-main {
  padding: 18px 22px;
  gap: 14px;
  overflow-y: hidden;
}

.ct-msg {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
  animation: msg-in .3s ease both;
}
@keyframes msg-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ct-msg.faded { opacity: 0.45; }
.ct-who {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--ink);
  margin-top: 2px;
}
.ct-msg-bot .ct-who {
  background: oklch(0.95 0.04 50);
  border: 1px solid oklch(0.88 0.05 50);
}
.ct-msg-user .ct-body {
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
  padding-top: 2px;
  display: flex; align-items: center;
}
.ct-msg-bot .ct-body {
  padding-top: 2px;
}
.ct-line {
  font-size: 13px;
  color: var(--ink-2);
  margin: 0 0 8px;
  line-height: 1.5;
  animation: msg-in .25s ease both;
}
.ct-summary { animation-delay: .05s; }

.ct-tool {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  margin-bottom: 10px;
  opacity: 0;
  transform: translateY(2px);
  transition: all .25s ease;
}
.ct-tool.on { opacity: 1; transform: translateY(0); }
.ct-tool-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 18%, transparent);
}
.ct-tool code {
  font-family: var(--mono);
  color: var(--ink-2);
}

/* Result table */
.ct-table {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 10px;
  font-size: 12px;
}
.ct-table th, .ct-table td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
}
.ct-table th {
  font-weight: 500;
  color: var(--ink-3);
  font-size: 11px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line-2);
}
.ct-table th.num, .ct-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ct-table th.rk, .ct-table td.rk {
  width: 32px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.ct-row-in {
  animation: row-in .25s ease both;
}
@keyframes row-in {
  from { opacity: 0; transform: translateX(-4px); }
  to   { opacity: 1; transform: translateX(0); }
}

.ct-mini-table-stub {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  padding: 6px 10px;
  border: 1px dashed var(--line-2);
  border-radius: 6px;
}

/* Mobile */
@media (max-width: 720px) {
  .hd-stage { height: 380px; }
  .scene { padding: 24px; }
  .stripe-card, .ebay-card, .claude-settings { width: 100%; }
  .claude-frame { grid-template-columns: 1fr; }
  .cf-side { display: none; }
  .ct-table { font-size: 11px; }
  .ct-table td, .ct-table th { padding: 5px 6px; }
}
