/* How we help — use case cards + UI mockups */

#solutions {
  --solution-card-w: 320px;
  --solution-card-h: 420px;
  --solution-gap: 20px;
  --solution-visible: 3;
  padding: 88px 0 96px;
  overflow: hidden;
}

#solutions .solutions-stage {
  position: relative;
  margin-top: 8px;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
}

#solutions .solutions-intro {
  margin-bottom: 40px;
  max-width: 680px;
}

#solutions .solutions-intro h2 {
  font-size: var(--fs-display);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 14px;
}

#solutions .solutions-intro .lead {
  margin-top: 0;
  max-width: 58ch;
}

.solution-rail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 32px;
  box-sizing: border-box;
}

.solution-rail__viewport {
  flex: 0 0 auto;
  width: calc(
    var(--solution-card-w) * var(--solution-visible) +
    var(--solution-gap) * (var(--solution-visible) - 1)
  );
  max-width: min(
    calc(
      var(--solution-card-w) * var(--solution-visible) +
      var(--solution-gap) * (var(--solution-visible) - 1)
    ),
    calc(100vw - 140px)
  );
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 28px 0 36px;
}

.solution-rail__viewport::-webkit-scrollbar { display: none; }

.solution-rail__track {
  display: flex;
  align-items: stretch;
  gap: var(--solution-gap);
  width: max-content;
}

.use-card {
  flex: 0 0 var(--solution-card-w);
  width: var(--solution-card-w);
  min-height: var(--solution-card-h);
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  scroll-snap-align: center;
  cursor: default;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), opacity 0.35s var(--ease);
}

.solution-rail__track:has(.use-card:hover) .use-card:not(:hover),
.solution-rail__track:has(.use-card.is-active) .use-card:not(.is-active) {
  opacity: 0.72;
  transform: scale(0.98);
}

.use-card:hover,
.use-card.is-active {
  transform: translateY(-6px) scale(1.02);
  z-index: 5;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.12);
}

/* ── Card visual (mockup) ── */
.use-card__visual {
  flex: 0 0 212px;
  height: 212px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #f4f4f6 0%, #ececef 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.use-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px 20px 22px;
}

.use-card__title {
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 8px;
  color: var(--text);
}

.use-card__what {
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 10px;
  flex: 1;
}

.use-card__gain {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ── Shared mock chrome ── */
.mock {
  width: 100%;
  max-width: 268px;
  border-radius: 12px;
  background: #fff;
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.04),
    0 12px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 10px;
  line-height: 1.35;
  color: #1d1d1f;
  overflow: hidden;
}

.mock__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  background: #fafafa;
  border-bottom: 1px solid #eee;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: -0.01em;
}

.mock__pill {
  font-size: 9px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 99px;
  background: #eee;
  color: #555;
}

.mock__pill--on {
  background: rgba(255, 102, 0, 0.12);
  color: #c44e00;
}

.mock__pill--wait {
  background: #fff4e5;
  color: #9a5b00;
}

.mock__tag {
  font-size: 9px;
  color: #888;
  font-weight: 500;
}

.mock__btn {
  display: block;
  width: calc(100% - 20px);
  margin: 0 10px 10px;
  padding: 7px 10px;
  border: none;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  font-family: inherit;
}

.mock__btn--ghost {
  background: #f0f0f2;
  color: #333;
}

.mock__btn--pay {
  background: #1d1d1f;
}

/* ── 1. Messages mock ── */
.mock--messages .mock__thread {
  padding: 10px 11px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mock__bubble {
  max-width: 88%;
  padding: 6px 9px;
  border-radius: 10px;
  font-size: 9.5px;
  line-height: 1.4;
}

.mock__bubble--in {
  align-self: flex-start;
  background: #f0f0f2;
  color: #333;
}

.mock__bubble--out {
  align-self: flex-end;
  background: #e8e8ed;
  color: #1d1d1f;
}

.mock__bubble--brand {
  background: rgba(255, 102, 0, 0.14);
  color: #9a4000;
  font-weight: 600;
}

.mock__footer {
  padding: 7px 11px;
  font-size: 9px;
  font-weight: 600;
  text-align: center;
  border-top: 1px solid #eee;
}

.mock__footer--ok {
  background: #f0faf4;
  color: #1a6b3c;
}

/* ── 2. Proposal mock ── */
.mock--proposal .mock__tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px 11px 8px;
}

.mock__tier {
  padding: 8px 6px;
  border-radius: 8px;
  border: 1px solid #eee;
  text-align: center;
}

.mock__tier span {
  display: block;
  font-size: 8px;
  color: #888;
  margin-bottom: 3px;
}

.mock__tier strong {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mock__tier--active {
  border-color: var(--brand);
  background: rgba(255, 102, 0, 0.06);
  box-shadow: 0 0 0 1px rgba(255, 102, 0, 0.2);
}

.mock--proposal .mock__lines {
  padding: 0 11px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mock--proposal .mock__lines span {
  display: block;
  height: 5px;
  border-radius: 3px;
  background: #f0f0f2;
}

.mock--proposal .mock__lines span:nth-child(1) { width: 92%; }
.mock--proposal .mock__lines span:nth-child(2) { width: 78%; }
.mock--proposal .mock__lines span:nth-child(3) { width: 65%; }

/* ── 3. Schedule mock ── */
.mock--schedule .mock__days {
  display: flex;
  justify-content: space-between;
  padding: 8px 14px 6px;
  font-size: 9px;
  font-weight: 600;
  color: #aaa;
}

.mock--schedule .mock__days .on {
  color: var(--brand);
}

.mock__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 10px 6px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #f7f7f8;
  font-size: 9.5px;
}

.mock__row--ok {
  background: #f0faf4;
}

.mock__row--ok span:last-child {
  color: #1a6b3c;
  font-weight: 600;
}

.mock__row--wait span:last-child {
  color: #9a5b00;
  font-weight: 600;
}

.mock__chip {
  margin: 4px 10px 10px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 102, 0, 0.08);
  color: #9a4000;
  font-size: 9px;
  font-weight: 600;
  text-align: center;
}

/* ── 4. Change order mock ── */
.mock--co .mock__co-title {
  padding: 10px 11px 6px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
}

.mock__co-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 11px 10px;
}

.mock__co-stats div {
  padding: 8px;
  border-radius: 8px;
  background: #f7f7f8;
  text-align: center;
}

.mock__co-stats em {
  display: block;
  font-style: normal;
  font-size: 8px;
  color: #888;
  margin-bottom: 2px;
}

.mock__co-stats strong {
  font-size: 12px;
  font-weight: 700;
  color: #1d1d1f;
}

.mock__actions {
  display: flex;
  gap: 6px;
  padding: 0 10px 10px;
}

.mock__actions .mock__btn {
  flex: 1;
  width: auto;
  margin: 0;
  padding: 7px 6px;
}

/* ── 5. Invoice mock ── */
.mock--invoice .mock__amount {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mock__inv-mile {
  padding: 10px 11px 8px;
  font-size: 9.5px;
  color: #555;
}

.mock__progress {
  height: 5px;
  margin: 0 11px 10px;
  background: #eee;
  border-radius: 99px;
  overflow: hidden;
}

.mock__progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), #ff9940);
  border-radius: 99px;
}

.mock__inv-row {
  display: flex;
  justify-content: space-between;
  padding: 0 11px 8px;
  font-size: 9.5px;
}

.mock__inv-row strong {
  font-weight: 700;
}

.mock--invoice .mock__btn {
  margin-bottom: 11px;
}

/* ── 6. Permits mock ── */
.mock__checklist {
  list-style: none;
  padding: 8px 11px 12px;
  margin: 0;
}

.mock__checklist li {
  position: relative;
  padding: 7px 0 7px 22px;
  font-size: 9.5px;
  border-bottom: 1px solid #f0f0f2;
  color: #888;
}

.mock__checklist li:last-child { border-bottom: none; }

.mock__checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid #ddd;
  background: #fff;
}

.mock__checklist li.done {
  color: #1d1d1f;
}

.mock__checklist li.done::before {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: #1a6b3c;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.mock__checklist li.active {
  color: var(--brand);
  font-weight: 600;
}

.mock__checklist li.active::before {
  border-color: var(--brand);
  background: rgba(255, 102, 0, 0.15);
}

.solution-rail__arrow {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #1d1d1f;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s var(--ease), opacity 0.2s;
}

.solution-rail__arrow:hover:not(:disabled) { transform: scale(1.05); }

.solution-rail__arrow:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

@media (max-width: 1100px) {
  #solutions { --solution-visible: 2; --solution-card-w: 300px; }
}

@media (max-width: 720px) {
  #solutions {
    --solution-visible: 1;
    --solution-card-w: min(320px, calc(100vw - 120px));
    --solution-card-h: 400px;
  }
  .solution-rail { padding: 0 20px; gap: 10px; }
  .solution-rail__viewport { max-width: calc(100% - 96px); }
  .solution-rail__arrow { width: 40px; height: 40px; }
  .use-card__visual { flex: 0 0 196px; height: 196px; }
}

@media (prefers-reduced-motion: reduce) {
  .use-card { transition: none; }
  .use-card:hover,
  .use-card.is-active { transform: none; }
  .solution-rail__viewport { scroll-behavior: auto; }
}
