/* ============================================================
   Ventorify Stocky migration page styles (loads after css/site.css)
   Page-scoped classes only; shared selectors stay untouched.
   ============================================================ */

/* ---------- Hero ---------- */

.stocky-hero {
  overflow: hidden;
}
.stocky-hero .split {
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
}
.stocky-hero .split-copy > .pill {
  margin-bottom: 1.2rem;
}
.stocky-hero h1 {
  font-size: clamp(2.2rem, 1.1rem + 3.4vw, 3.15rem);
  max-width: 21ch;
  text-wrap: balance;
}
.stocky-hero .lead {
  max-width: 30rem;
}

/* Hero mockup: inventory monitor with reorder-to-PO flow */
.monitor-mock {
  transform: perspective(1600px) rotateX(2deg) rotate(-0.5deg);
}
@media (prefers-reduced-motion: no-preference) {
  html.js .monitor-mock {
    transition: transform 0.8s var(--ease-out), box-shadow 0.8s var(--ease-out);
  }
  html.js .monitor-mock:hover {
    transform: perspective(1600px) rotateX(0deg) rotate(0deg);
  }
}

.rf-flow {
  display: grid;
  gap: 0.6rem;
  padding: 0.9rem 1.1rem;
  border-top: 1px solid var(--border-soft);
  background: #fcfcff;
  border-radius: 0 0 var(--r-card) var(--r-card);
}
.rf-step {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-chip);
  padding: 0.6rem 0.9rem;
  box-shadow: var(--shadow-sm);
  font-size: var(--text-small);
}
.rf-step .pill {
  flex: none;
}
.rf-text {
  color: var(--slate);
}
.rf-text b {
  color: var(--ink);
  font-weight: 640;
}
.rf-po {
  justify-content: space-between;
}
.po-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--ink);
  min-width: 0;
}
.po-chip svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--indigo);
}

/* Pre-animation hidden state: JS-only and motion-gated, so the raw
   HTML and reduced-motion users always see the finished flow. */
@media (prefers-reduced-motion: no-preference) {
  html.js .rf-step {
    transition:
      opacity 0.5s var(--ease-out),
      transform 0.5s var(--ease-out);
  }
  html.js .rf-step.rf-pending {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* ---------- Job mapping ledger ---------- */

.jobmap {
  display: grid;
  gap: 1.1rem;
}
.jobmap-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 1.1rem;
  align-items: stretch;
}
.jobmap-tag {
  display: inline-block;
  font-size: var(--text-micro);
  font-weight: 640;
  color: var(--slate-light);
  margin-bottom: 0.8rem;
}
/* Ledger feel: column tags read once at the top on desktop */
.jobmap-row:not(:first-child) .jobmap-tag {
  display: none;
}

.job-cell {
  border: 1px dashed var(--border);
  border-radius: var(--r-card);
  padding: 1.5rem;
}
.job-cell h3 {
  font-size: 1.12rem;
  font-weight: 660;
}
.job-cell p {
  margin-top: 0.5rem;
  color: var(--slate-light);
  font-size: var(--text-small);
  line-height: 1.6;
  max-width: 32ch;
}

.job-continue {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-card);
  padding: 1.5rem 1.7rem;
  box-shadow: var(--shadow-sm);
}
.job-continue h3 {
  font-size: 1.12rem;
  font-weight: 660;
}
.job-continue > p {
  margin-top: 0.55rem;
  color: var(--slate);
  font-size: var(--text-small);
  line-height: 1.65;
  max-width: 58ch;
}
.job-links {
  margin-top: 1rem;
  display: flex;
  gap: 0.4rem 1.6rem;
  flex-wrap: wrap;
}
.job-links .link-arrow {
  font-size: 0.9rem;
}

.jobmap-row.is-new .job-continue {
  background: linear-gradient(160deg, var(--indigo-tint), #f6f8fe 65%);
  border-color: var(--indigo-soft);
}
.job-new-pill {
  margin-bottom: 0.8rem;
}
.jobmap-row.is-new .job-continue .job-new-pill {
  background: #fff;
}

/* ---------- Honest transition (observation mock) ---------- */

.obs-mock {
  max-width: 29rem;
  margin-inline: auto;
}
.obs-mock .mock-body {
  padding-block: 0.4rem;
}
.obs-foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.75rem 1.1rem;
  border-top: 1px solid var(--border-soft);
  background: #fcfcff;
  border-radius: 0 0 var(--r-card) var(--r-card);
  font-size: var(--text-micro);
  color: var(--slate-light);
}
.obs-writes {
  font-weight: 640;
  color: var(--success);
}

/* ---------- Sunset timeline ---------- */

.sunset-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.sunset-timeline li {
  position: relative;
  padding-top: 1.5rem;
}
.sunset-timeline li::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 18px;
  right: -2rem;
  height: 2px;
  background: var(--border-soft);
}
.sunset-timeline li:last-child::before {
  right: 0;
}
.sunset-timeline li::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--indigo);
  box-shadow: 0 0 0 4px var(--indigo-tint);
}
.sunset-timeline li.is-sunset::after {
  background: var(--warning);
  box-shadow: 0 0 0 4px var(--warning-tint);
}
.sunset-timeline h3 {
  font-size: 1.05rem;
  font-weight: 660;
}
.sunset-timeline li.is-sunset h3 {
  color: #b35c00;
}
.sunset-timeline p {
  margin-top: 0.5rem;
  font-size: var(--text-small);
  color: var(--slate);
  line-height: 1.6;
  max-width: 26ch;
}

/* ---------- Plans note ---------- */

.manage-card {
  max-width: 26rem;
  margin-inline: auto;
  width: 100%;
  padding: 1.8rem;
}
.manage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.manage-head h3 {
  font-size: 1.1rem;
}
.manage-card .manage-price {
  margin-top: 0.8rem;
  font-size: 2rem;
  font-weight: 720;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.manage-per {
  font-size: 0.95rem;
  font-weight: 520;
  color: var(--slate-light);
  margin-left: 2px;
}
.manage-card .manage-orders {
  margin-top: 0.35rem;
  font-size: var(--text-micro);
  font-weight: 620;
  color: var(--indigo);
}
.manage-card .checklist {
  margin-top: 1.3rem;
}
.manage-card .checklist li span {
  font-size: var(--text-small);
}

/* ---------- Responsive ---------- */

@media (max-width: 899px) {
  .monitor-mock {
    transform: none;
  }
  .stocky-hero .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .jobmap {
    gap: 2rem;
  }
  .jobmap-row {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  .jobmap-row:not(:first-child) .jobmap-tag {
    display: inline-block;
  }
  .sunset-timeline {
    position: relative;
    grid-template-columns: 1fr;
    gap: 1.7rem;
  }
  .sunset-timeline::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--border-soft);
  }
  .sunset-timeline li {
    padding: 0 0 0 1.8rem;
  }
  .sunset-timeline li::before {
    display: none;
  }
  .sunset-timeline li::after {
    top: 5px;
  }
  .obs-mock {
    margin-inline: 0;
  }
  .manage-card {
    margin-inline: 0;
  }
}

@media (max-width: 679px) {
  /* Narrow screens: drop the On hand column; the story stays
     coverage + status. Product names may wrap so the table never
     forces the viewport wider. */
  .monitor-mock .mock-table th:nth-child(2),
  .monitor-mock .mock-table td:nth-child(2) {
    display: none;
  }
  .monitor-mock .mock-table th:first-child,
  .monitor-mock .mock-table td:first-child {
    white-space: normal;
  }
}
