/* Homepage product story — scripted Wrench Cove sales demo.
   Light app chrome on the dark marketing page. Camera crops per beat. */

.wc-story-section { z-index: 2; overflow-x: hidden; }

.wc-story {
  --fd-bg: #F4F6F8;
  --fd-surface: #ffffff;
  --fd-surface-2: #F8FAFC;
  --fd-ink: #111827;
  --fd-ink-muted: #475467;
  --fd-ink-faint: #667085;
  --fd-border: #D5DCE3;
  --fd-border-strong: #C3CCD6;
  --fd-accent: #1d4ed8;
  --fd-accent-soft: #dbeafe;
  --fd-ok: #059669;
  --fd-ok-soft: #ecfdf5;
  --fd-warn: #d97706;
  --fd-warn-soft: #fffbeb;
  --fd-radius: 10px;
  --fd-radius-sm: 8px;
  --fd-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --story-dur: 0.55s;
  max-width: 58rem;
  font-family: var(--fd-font);
  color: #e2e8f0;
}
.wc-story h1,
.wc-story h2,
.wc-story h3 {
  font-family: var(--fd-font);
  letter-spacing: -0.02em;
}

.wc-story__line {
  min-height: 1.6em;
  margin: 0 0 1rem;
  color: #e2e8f0;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.wc-story__beats {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.wc-story__beats::-webkit-scrollbar { display: none; }
.wc-story__beats button {
  appearance: none;
  min-height: 2.5rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: transparent;
  color: #94a3b8;
  font: 700 0.68rem Outfit, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}
.wc-story__beats button:hover,
.wc-story__beats button:focus-visible {
  color: #fff;
  border-color: rgba(147, 197, 253, 0.55);
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}
.wc-story__beats button.is-done {
  color: #7d90a6;
  border-color: rgba(148, 163, 184, 0.16);
}
.wc-story__beats button[aria-selected="true"],
.wc-story__beats button.is-now {
  background: rgba(37, 99, 235, 0.28);
  border-color: transparent;
  color: #fff;
}

.wc-story__window {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 1rem;
  background: var(--fd-bg);
  box-shadow:
    0 0 0 1px rgba(59, 130, 246, 0.12),
    0 24px 60px rgba(0, 0, 0, 0.38);
  color: var(--fd-ink);
  font-family: var(--fd-font);
}

.wc-story__bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.6rem;
  padding: 0 0.85rem;
  background: var(--fd-surface);
  border-bottom: 1px solid var(--fd-border);
}
.wc-story__bar-brand {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fd-ink);
}
.wc-story__bar-view {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fd-accent);
}

.wc-story__app {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.wc-story__rail {
  display: none;
  padding: 0.85rem 0.7rem;
  background: #F8FAFC;
  border-right: 1px solid var(--fd-border);
  color: var(--fd-ink-faint);
  font-size: 0.72rem;
  font-weight: 700;
}
.wc-story__rail-mark {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  margin-bottom: 0.75rem;
  border-radius: 0.4rem;
  background: var(--fd-accent);
  color: #fff;
  font-size: 0.62rem;
}
.wc-story__rail span {
  display: block;
  padding: 0.38rem 0.4rem;
  border-radius: 0.4rem;
}
.wc-story__rail .is-on,
.wc-story[data-beat="request"] .wc-story__rail span:nth-child(3),
.wc-story[data-beat="assign"] .wc-story__rail span:nth-child(3),
.wc-story[data-beat="repair"] .wc-story__rail span:nth-child(3),
.wc-story[data-beat="part"] .wc-story__rail span:nth-child(3),
.wc-story[data-beat="complete"] .wc-story__rail span:nth-child(3) {
  background: var(--fd-accent-soft);
  color: var(--fd-accent);
}
.wc-story[data-beat="link"] .wc-story__rail span:nth-child(4),
.wc-story[data-beat="history"] .wc-story__rail span:nth-child(4),
.wc-story[data-beat="payoff"] .wc-story__rail span:nth-child(4) {
  background: var(--fd-accent-soft);
  color: var(--fd-accent);
}
.wc-story[data-beat="request"] .wc-story__rail span.is-on,
.wc-story[data-beat="assign"] .wc-story__rail span.is-on,
.wc-story[data-beat="repair"] .wc-story__rail span.is-on,
.wc-story[data-beat="part"] .wc-story__rail span.is-on,
.wc-story[data-beat="complete"] .wc-story__rail span.is-on,
.wc-story[data-beat="link"] .wc-story__rail span.is-on,
.wc-story[data-beat="history"] .wc-story__rail span.is-on,
.wc-story[data-beat="payoff"] .wc-story__rail span.is-on {
  background: transparent;
  color: var(--fd-ink-faint);
}

.wc-story__lens {
  position: relative;
  isolation: isolate;
  height: 26rem;
  overflow: hidden;
  background: var(--fd-bg);
}

.wc-story__scene {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--story-dur) ease;
}
.wc-story__scene.is-on {
  z-index: 2;
  opacity: 1;
  pointer-events: auto;
}

.wc-story__shot {
  position: absolute;
  inset: 0.85rem 0.9rem auto;
  transform-origin: 0 0;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.wc-story__kicker {
  margin: 0 0 0.45rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fd-accent);
}

.wc-story__card,
.wc-story__job {
  padding: 0.95rem 1rem;
  border: 1px solid var(--fd-border);
  border-radius: var(--fd-radius-sm);
  background: var(--fd-surface);
  box-shadow: 0 1px 2px rgb(17 24 39 / 0.05), 0 8px 22px rgb(17 24 39 / 0.06);
  border-left: 4px solid var(--fd-accent);
}
.wc-story__card h3,
.wc-story__job h3,
.wc-story__equip-head h3 {
  margin: 0 0 0.25rem;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fd-ink);
}
.wc-story__card > p,
.wc-story__equip-head p:last-child {
  margin: 0;
  color: var(--fd-ink-muted);
  font-size: 0.88rem;
}

.wc-story__card-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}
.wc-story__time,
.wc-story__card-top + h3 + p {
  color: var(--fd-ink-faint);
  font-size: 0.78rem;
  font-weight: 650;
}

.wc-story__chip {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: var(--fd-surface-2);
  border: 1px solid var(--fd-border);
  color: var(--fd-ink-muted);
  font-size: 0.68rem;
  font-weight: 750;
}
.wc-story__chip--new { background: var(--fd-surface-2); }
.wc-story__chip--wo { background: var(--fd-accent-soft); color: var(--fd-accent); border-color: transparent; }
.wc-story__chip--assigned,
.wc-story__chip--progress { background: var(--fd-accent-soft); color: var(--fd-accent); border-color: transparent; }
.wc-story__chip--done { background: var(--fd-ok-soft); color: var(--fd-ok); border-color: transparent; }

.wc-story__card--arrive {
  animation: wc-story-arrive 0.55s ease both;
}

.wc-story__chain {
  display: grid;
  gap: 0.45rem;
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
}
.wc-story__chain li {
  display: grid;
  gap: 0.1rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.5rem;
  background: var(--fd-surface-2);
  border: 1px solid var(--fd-border);
}
.wc-story__chain span {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fd-ink-faint);
}
.wc-story__chain strong { font-size: 0.95rem; }
.wc-story__chain .is-focus {
  border-color: color-mix(in srgb, var(--fd-accent) 40%, var(--fd-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--fd-accent) 16%, transparent);
  background: var(--fd-accent-soft);
}
.wc-story[data-beat="link"] .wc-story__chain li {
  animation: wc-story-arrive 0.45s ease both;
}
.wc-story[data-beat="link"] .wc-story__chain li:nth-child(2) { animation-delay: 0.12s; }
.wc-story[data-beat="link"] .wc-story__chain li:nth-child(3) { animation-delay: 0.24s; }

.wc-story__equip-head { margin-bottom: 0.75rem; }
.wc-story__equip-head .wc-story__kicker { margin-bottom: 0.2rem; }

.wc-story__hist-row {
  display: grid;
  gap: 0.25rem;
}
.wc-story__hist-row time,
.wc-story__timeline time {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fd-ink-faint);
}
.wc-story__hist-row dl {
  display: grid;
  gap: 0.35rem;
  margin: 0.55rem 0 0;
}
.wc-story__hist-row dl div { display: grid; gap: 0.05rem; }
.wc-story__hist-row dt {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fd-ink-faint);
}
.wc-story__hist-row dd { margin: 0; font-weight: 650; font-size: 0.88rem; }
.wc-story__card--wow.is-lit,
.wc-story__hist-row.is-lit {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--fd-accent) 18%, transparent);
}

.wc-story__assign {
  display: grid;
  gap: 0.1rem;
  margin-top: 0.8rem;
  padding: 0.65rem 0.7rem;
  border-radius: 0.55rem;
  background: var(--fd-accent-soft);
}
.wc-story__assign span {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fd-accent);
}
.wc-story__assign strong { font-size: 1.05rem; }
.wc-story__assign em { font-style: normal; color: var(--fd-ink-muted); font-size: 0.82rem; }

.wc-story__note {
  margin: 0 0 0.7rem;
  color: var(--fd-ink-muted);
  font-size: 0.86rem;
}
.wc-story__diag {
  margin: 0 0 0.7rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.55rem;
  background: var(--fd-warn-soft);
}
.wc-story__diag span {
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fd-warn);
}
.wc-story__diag.is-lit {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--fd-warn) 16%, transparent);
}
.wc-story__late { display: none; }
.wc-story__finish {
  appearance: none;
  margin-top: 0.75rem;
  min-height: 2.5rem;
  padding: 0.45rem 0.95rem;
  border: 0;
  border-radius: 999px;
  background: var(--fd-ok);
  color: #fff;
  font: 700 0.85rem var(--fd-font);
  pointer-events: none;
}

.wc-story__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0.7rem 0 0.8rem;
}
.wc-story__meta dt {
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fd-ink-faint);
}
.wc-story__meta dd { margin: 0.12rem 0 0; font-size: 0.82rem; font-weight: 750; }

.wc-story__steps,
.wc-story__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.7rem;
  padding: 0;
  list-style: none;
}
.wc-story__steps li,
.wc-story__checks li {
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
  background: var(--fd-surface-2);
  border: 1px solid var(--fd-border);
  color: var(--fd-ink-faint);
  font-size: 0.7rem;
  font-weight: 750;
}
.wc-story__steps .is-on,
.wc-story__checks .is-on {
  background: var(--fd-accent-soft);
  border-color: transparent;
  color: var(--fd-accent);
}
.wc-story__steps .is-done,
.wc-story__checks .is-done {
  background: var(--fd-ok-soft);
  border-color: transparent;
  color: var(--fd-ok);
}

.wc-story__part {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.wc-story__part strong { font-size: 1.05rem; }
.wc-story__stock {
  margin: 0.65rem 0 0;
  color: var(--fd-ink-muted);
  font-size: 0.88rem;
}
.wc-story__stock b { color: var(--fd-ink); }
.wc-story[data-beat="part"] .wc-story__stock b:last-child {
  color: var(--fd-ok);
}
.wc-story__aside {
  margin: 0.7rem 0 0;
  color: var(--fd-ink-muted);
  font-size: 0.86rem;
}

.wc-story__card--done { border-left-color: var(--fd-ok); }
.wc-story[data-beat="payoff"] .wc-story__card--done {
  transform: translateY(18%) scale(0.92);
  opacity: 0;
}

.wc-story__timeline {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.wc-story__timeline li {
  padding: 0.7rem 0.75rem;
  border-radius: var(--fd-radius-sm);
  background: var(--fd-surface);
  border: 1px solid var(--fd-border);
}
.wc-story__timeline strong { display: block; margin: 0.1rem 0 0.25rem; }
.wc-story__timeline ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.wc-story__timeline ul li {
  padding: 0.15rem 0.45rem;
  border: 0;
  background: var(--fd-surface-2);
  color: var(--fd-ink-muted);
  font-size: 0.68rem;
  font-weight: 700;
}
.wc-story__hist-new {
  border-color: color-mix(in srgb, var(--fd-accent) 42%, var(--fd-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--fd-accent) 16%, transparent);
}
.wc-story__hist-new.is-joining {
  animation: wc-story-join 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.wc-story__closer {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.7rem;
  z-index: 5;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgb(17 24 39 / 0.12);
  font-family: var(--fd-font);
  font-size: clamp(1.05rem, 2.6vw, 1.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--fd-ink);
  opacity: 0;
  pointer-events: none;
}
.wc-story[data-beat="payoff"] .wc-story__closer {
  opacity: 1;
  transition: opacity 0.45s ease 0.55s;
}
.wc-story[data-beat="payoff"] .wc-story__shot--payoff {
  padding-bottom: 5.5rem;
}

.wc-story__cursor {
  position: absolute;
  z-index: 4;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1d4ed8;
  box-shadow: 0 0 0 6px rgba(29, 78, 216, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: left 0.55s ease, top 0.55s ease, opacity 0.25s ease;
}
.wc-story__cursor { display: none; }

.wc-story__dock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.1rem;
  margin-top: 1rem;
}
.wc-story__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.wc-story__ctrl {
  appearance: none;
  min-height: 2.75rem;
  min-width: 4.2rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: transparent;
  color: #94a3b8;
  font: 700 0.78rem Outfit, sans-serif;
  cursor: pointer;
}
.wc-story__ctrl:hover,
.wc-story__ctrl:focus-visible {
  border-color: rgba(147, 197, 253, 0.6);
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}
.wc-story__ctrl--play {
  background: #1d4ed8;
  border-color: transparent;
  color: #fff;
}
.wc-story__hint {
  margin: 0;
  color: #94a3b8;
  font-size: 0.82rem;
}

.wc-story__end {
  margin-top: 1.25rem;
  padding-top: 0.25rem;
}
.wc-story__end[hidden] { display: none; }
.wc-story__end p {
  margin: 0 0 0.85rem;
  color: #cbd5e1;
  font-size: 1rem;
}
.wc-story__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* Camera crops — Apple-style focus on the beat that matters */
@media (min-width: 700px) {
  .wc-story[data-beat="request"] .wc-story__shot--request { transform: scale(1.06) translateY(3%); }
  .wc-story[data-beat="link"] .wc-story__shot--link { transform: none; }
  .wc-story[data-beat="history"] .wc-story__shot--history { transform: none; }
  .wc-story[data-beat="assign"] .wc-story__shot--assign { transform: scale(1.04) translateY(2%); }
  .wc-story[data-beat="repair"] .wc-story__shot--repair { transform: none; }
  .wc-story[data-beat="part"] .wc-story__shot--part { transform: none; }
  .wc-story[data-beat="complete"] .wc-story__shot--complete { transform: scale(1.04) translateY(2%); }
  .wc-story[data-beat="payoff"] .wc-story__shot--payoff { transform: none; }
}

@media (min-width: 1024px) {
  .wc-story { max-width: 64rem; }
  .wc-story__app { grid-template-columns: 7.2rem minmax(0, 1fr); }
  .wc-story__rail { display: block; }
  .wc-story__lens { height: 28.5rem; }
  .wc-story__shot { inset: 1.1rem 1.15rem auto; }
}

@media (max-width: 699px) {
  .wc-story__lens { height: 30rem; }
  .wc-story__meta { grid-template-columns: 1fr 1fr; }
  .wc-story__meta div:last-child { grid-column: 1 / -1; }
  .wc-story__beats button { padding: 0.4rem 0.55rem; font-size: 0.62rem; }
  .wc-story__equip-head { margin-bottom: 0.5rem; }
  .wc-story__equip-head h3 { font-size: 1.02rem; }
  .wc-story__timeline { gap: 0.4rem; }
  .wc-story__timeline li { padding: 0.5rem 0.6rem; }
  .wc-story__closer { font-size: 1.08rem; }
  .wc-story__job h3,
  .wc-story__card h3 { font-size: 1.02rem; }
  .wc-story__checks { margin-bottom: 0; }
  .wc-story__steps { display: none; }
  .wc-story__hist-row dl { margin-top: 0.35rem; gap: 0.25rem; }
  .wc-story__card,
  .wc-story__job { padding: 0.8rem 0.85rem; }
  .wc-story__shot--history .wc-story__equip-head p:last-child { display: none; }
}

@keyframes wc-story-arrive {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes wc-story-join {
  from { transform: translateY(14px); box-shadow: 0 0 0 0 transparent; }
  to { transform: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--fd-accent) 16%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
  .wc-story,
  .wc-story__scene,
  .wc-story__shot,
  .wc-story__card--arrive,
  .wc-story__chain li,
  .wc-story__hist-new,
  .wc-story__cursor {
    animation: none !important;
    transition: none !important;
  }
  .wc-story[data-beat] .wc-story__shot { transform: none !important; }
  .wc-story__hist-new.is-joining {
    animation: none !important;
  }
}
