/* Animated product scenes for the homepage (assets/scenes.js).
   The hero phone mirrors the engineer app's job screen; the four flow
   visuals sit beside the "From booking to Boshed to paid" cards. Colours
   are the app's own status colours (app/src/utils/status.ts). */

:root {
  --bsh-scheduled: #7eb6ff;
  --bsh-otw: #f0b94d;
  --bsh-arrived: #5ad6ff;
  --bsh-boshed: #6cd18b;
}

/* ---------------------------------------------------------------
   Hero phone
   --------------------------------------------------------------- */
.bph-wrap { position: relative; width: 100%; max-width: 330px; margin: 0 auto; }
.bph {
  position: relative;
  aspect-ratio: 9 / 19.2;
  border-radius: 48px;
  padding: 11px;
  background: linear-gradient(145deg, #3a4656, #1d232c 40%, #2b3440);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.18), 0 40px 80px -30px rgba(10,14,22,0.7);
}
.bph-screen {
  position: relative; height: 100%; overflow: hidden;
  border-radius: 38px; background: #0a0a0c; color: #fcfcfc;
  font-family: "Inter", "Inter Tight", system-ui, sans-serif;
  display: flex; flex-direction: column;
}
.bph-status { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px 4px; font-size: 12.5px; font-weight: 600; }
.bph-island { width: 86px; height: 24px; border-radius: 14px; background: #000; }
.bph-sys { display: inline-flex; gap: 4px; align-items: center; }
.bph-sys i { display: inline-block; width: 3px; border-radius: 1px; background: #fcfcfc; }
.bph-sys i:nth-child(1) { height: 5px; } .bph-sys i:nth-child(2) { height: 7px; } .bph-sys i:nth-child(3) { height: 9px; }
.bph-sys b { margin-left: 4px; font-size: 9.5px; padding: 1px 4px; border-radius: 4px; background: #34c759; color: #0a0a0c; }
.bph-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 8px 16px 6px; font-size: 13px; }
.bph-nav span:first-child { color: rgba(255,255,255,0.85); }
.bph-nav b { font-size: 13.5px; }
.bph-body { flex: 1; padding: 8px 16px 0; display: grid; gap: 9px; align-content: start; }
.bph-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: rgba(255,255,255,0.55); }
.bph-pill {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--pill, var(--bsh-scheduled)); border: 1.5px solid var(--pill, var(--bsh-scheduled));
  background: color-mix(in srgb, var(--pill, var(--bsh-scheduled)) 12%, transparent);
}
.bph-name { font-size: 21px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.1; }
.bph-sub { margin-top: -6px; font-size: 12px; color: rgba(255,255,255,0.6); }
.bph-card { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 12px; background: #1a1a1c; border: 1px solid rgba(255,255,255,0.06); font-size: 12px; }
.bph-card svg { width: 15px; height: 15px; flex: none; color: rgba(255,255,255,0.7); }
.bph-card span { flex: 1; min-width: 0; }
.bph-card small { display: block; color: rgba(255,255,255,0.5); font-size: 10.5px; }
.bph-btn { font-style: normal; font-size: 9px; font-weight: 700; letter-spacing: 0.08em; padding: 5px 9px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.25); }
.bph-label { font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em; color: rgba(255,255,255,0.5); margin-top: 2px; }
.bph-text { font-size: 11.5px; line-height: 1.45; color: rgba(255,255,255,0.85); }
.bph-rows { border-radius: 12px; background: #1a1a1c; border: 1px solid rgba(255,255,255,0.06); font-size: 11.5px; }
.bph-rows div { display: flex; justify-content: space-between; padding: 8px 11px; color: rgba(255,255,255,0.6); }
.bph-rows div + div { border-top: 1px solid rgba(255,255,255,0.06); }
.bph-rows b { color: #fcfcfc; font-weight: 600; }
.bph-cta { display: flex; gap: 8px; padding: 10px 14px 8px; }
.bph-go {
  flex: 1; display: grid; place-items: center; height: 46px; border-radius: 12px;
  background: #fff; color: #1a1a1c; font-weight: 700; font-size: 14px;
}
.bph-go.bosh { background: linear-gradient(180deg, #69d68a 0%, #57c074 100%); color: #0a2814; box-shadow: 0 8px 22px -10px rgba(105,214,138,0.75); }
.bph-go.done { background: rgba(108,209,139,0.12); color: var(--bsh-boshed); box-shadow: none; }
.bph-cancel { display: grid; place-items: center; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.18); color: rgba(255,255,255,0.55); font-size: 12px; font-weight: 600; }
.bph-tabs { display: flex; justify-content: space-around; padding: 8px 8px 18px; border-top: 1px solid rgba(255,255,255,0.06); font-size: 9.5px; color: rgba(255,255,255,0.55); }
.bph-tabs span { display: grid; justify-items: center; gap: 3px; }
.bph-tabs span.on { color: #fcfcfc; }
.bph-tabs svg { width: 19px; height: 19px; }

/* Bosh flow sheet */
.bph-sheet {
  position: absolute; inset: 44px 0 0; z-index: 4;
  border-radius: 22px 22px 0 0; background: #121214;
  box-shadow: 0 -12px 30px rgba(0,0,0,0.5);
  display: flex; flex-direction: column; padding: 14px 14px 18px;
  transform: translateY(105%);
}
.bph-stepper { display: flex; justify-content: space-between; gap: 4px; margin-bottom: 14px; }
.bph-step { display: grid; justify-items: center; gap: 4px; font-size: 8.5px; color: rgba(255,255,255,0.45); flex: 1; }
.bph-step i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 9.5px; font-weight: 700; border: 1.5px solid rgba(255,255,255,0.2); }
.bph-step.on { color: #fcfcfc; }
.bph-step.on i { border-color: #fcfcfc; }
.bph-step.done i { background: var(--bsh-boshed); border-color: var(--bsh-boshed); color: #0a2814; }
.bph-panes { position: relative; flex: 1; }
.bph-pane { position: absolute; inset: 0; display: grid; gap: 10px; align-content: start; opacity: 0; visibility: hidden; }
.bph-pane.on { opacity: 1; visibility: visible; }
.bph-pane h4 { margin: 0; font-size: 17px; font-weight: 800; color: #fcfcfc; line-height: 1.2; }
.bph-pane p { margin: -4px 0 0; font-size: 11px; color: rgba(255,255,255,0.55); line-height: 1.4; }
.bph-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bph-photo { aspect-ratio: 1; border-radius: 10px; background: linear-gradient(135deg, #3b4350, #20242b); position: relative; overflow: hidden; }
.bph-photo::after { content: ""; position: absolute; inset: 22% 18%; border-radius: 6px; border: 2px solid rgba(255,255,255,0.18); }
.bph-photo:nth-child(2) { background: linear-gradient(135deg, #4a3f35, #23201d); }
.bph-photo:nth-child(3) { background: linear-gradient(135deg, #34413a, #1c221f); }
.bph-photo.add { background: transparent; border: 1.5px dashed rgba(255,255,255,0.2); display: grid; place-items: center; font-size: 22px; color: rgba(255,255,255,0.4); }
.bph-photo.add::after { display: none; }
.bph-parts { display: grid; gap: 6px; }
.bph-part { display: flex; gap: 10px; padding: 10px 11px; border-radius: 10px; background: #1a1a1c; font-size: 12px; }
.bph-part b { color: rgba(255,255,255,0.55); font-weight: 600; }
.bph-sign { height: 150px; border-radius: 12px; background: #fcfcfc; position: relative; }
.bph-sign svg { position: absolute; inset: 10px 12px 26px; width: calc(100% - 24px); height: calc(100% - 36px); }
.bph-sign path { fill: none; stroke: #1a1a1c; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.bph-sign small { position: absolute; left: 12px; right: 12px; bottom: 9px; border-top: 1px solid #c9c9cf; padding-top: 4px; font-size: 9px; color: #6b6b72; }
.bph-done { display: grid; justify-items: center; text-align: center; gap: 12px; padding-top: 34px; }
.bph-tick { width: 84px; height: 84px; }
.bph-tick circle { fill: rgba(108,209,139,0.14); stroke: var(--bsh-boshed); stroke-width: 3; }
.bph-tick path { fill: none; stroke: var(--bsh-boshed); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.bph-done b { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.bph-sheet-cta { height: 46px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: #1a1a1c; font-weight: 700; font-size: 14px; }
.bph-sheet-cta.bosh { background: linear-gradient(180deg, #69d68a 0%, #57c074 100%); color: #0a2814; }

.bph-touch {
  position: absolute; z-index: 9; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border-radius: 50%; background: rgba(255,255,255,0.28);
  box-shadow: 0 0 0 1.5px rgba(255,255,255,0.85), 0 2px 10px rgba(0,0,0,0.35);
  opacity: 0; pointer-events: none;
}

/* The customer's text, floating beside the phone */
.bph-sms {
  position: absolute; z-index: 5; left: 50%; margin-left: -120px; bottom: 21%;
  width: 240px; padding: 11px 13px 12px; border-radius: 16px;
  background: rgba(252,252,252,0.96); color: #1a1a1c;
  box-shadow: 0 18px 40px -16px rgba(10,14,22,0.55);
  font-family: "Inter", system-ui, sans-serif; opacity: 0;
}
.bph-sms small { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 600; color: #6b6b72; text-transform: uppercase; letter-spacing: 0.06em; }
.bph-sms small i { width: 7px; height: 7px; border-radius: 50%; background: var(--dot, var(--bsh-otw)); }
.bph-sms span { display: block; margin-top: 5px; font-size: 12.5px; line-height: 1.4; }

.bph-cancel.gone { visibility: hidden; }

/* ---------------------------------------------------------------
   Flow visuals beside the four step cards
   --------------------------------------------------------------- */
.bsh-flow__visual { margin-top: 16px; }
@media (min-width: 1024px) {
  .bsh-flow__visual { margin-top: 0; grid-row: 1; grid-column: 3; }
  .bsh-flow__step:nth-child(even) .bsh-flow__visual { grid-column: 1; }
}
.bfv {
  position: relative; border-radius: 20px; overflow: hidden;
  background: #121214; border: 1px solid rgba(255,255,255,0.09);
  color: #fcfcfc; font-family: "Inter", system-ui, sans-serif; font-size: 13px;
  box-shadow: 0 30px 60px -36px rgba(0,0,0,0.8);
}
.bfv-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.07); font-size: 12px; color: rgba(255,255,255,0.55); }
.bfv-bar b { color: #fcfcfc; font-weight: 600; }
.bfv-bar em { margin-left: auto; font-style: normal; }
.bfv-body { padding: 14px 16px 16px; display: grid; gap: 10px; }
.bfv-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: 0.07em; color: var(--pill); border: 1.5px solid var(--pill); background: color-mix(in srgb, var(--pill) 12%, transparent); }

/* 01 new job */
.bfv-field { display: grid; grid-template-columns: 84px 1fr; align-items: center; gap: 10px; padding: 8px 11px; border-radius: 10px; background: #1a1a1c; }
.bfv-field span { font-size: 11px; color: rgba(255,255,255,0.5); }
.bfv-field b { font-weight: 500; min-height: 1.3em; }
.bfv-field b.typing::after { content: ""; display: inline-block; width: 1.5px; height: 1em; margin-left: 1px; vertical-align: -2px; background: #fcfcfc; animation: bfv-blink 0.9s steps(1) infinite; }
@keyframes bfv-blink { 50% { opacity: 0; } }
.bfv-eng { display: inline-flex; align-items: center; gap: 6px; }
.bfv-eng i { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 9.5px; font-weight: 700; color: var(--bsh-boshed); border: 1.5px solid var(--bsh-boshed); }
.bfv-save { display: grid; place-items: center; height: 40px; border-radius: 11px; background: #fff; color: #1a1a1c; font-weight: 700; }
.bfv-diary { display: grid; gap: 6px; padding-top: 4px; }
.bfv-lane { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 8px; font-size: 11px; color: rgba(255,255,255,0.55); }
.bfv-track { position: relative; height: 26px; border-radius: 7px; background: rgba(255,255,255,0.04); }
.bfv-job { position: absolute; top: 3px; bottom: 3px; border-radius: 5px; padding: 0 7px; display: flex; align-items: center; font-size: 10px; color: #0a0a0c; font-weight: 600; white-space: nowrap; overflow: hidden; background: var(--c, var(--bsh-scheduled)); }
.bfv-toast { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 8px 14px; border-radius: 999px; background: #fcfcfc; color: #1a1a1c; font-size: 11.5px; font-weight: 600; white-space: nowrap; opacity: 0; }

/* 02 texts */
.bfv-thread { display: grid; gap: 8px; align-content: start; min-height: 262px; }
.bfv-msg { justify-self: start; max-width: 88%; padding: 9px 12px; border-radius: 16px 16px 16px 5px; background: #26262b; font-size: 12.5px; line-height: 1.4; }
.bfv-msg small { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; font-size: 9.5px; color: rgba(255,255,255,0.5); }
.bfv-msg small i { width: 6px; height: 6px; border-radius: 50%; background: var(--dot); }
.bfv-dots { justify-self: start; display: inline-flex; gap: 4px; padding: 11px 13px; border-radius: 16px 16px 16px 5px; background: #26262b; opacity: 0; }
.bfv-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.5); }
.bsh-chip.lit { color: #0a0a0c; background: var(--c); border-color: var(--c); transition: background 0.3s, color 0.3s, border-color 0.3s; }

/* 03 on site */
.bfv-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bfv-shot { aspect-ratio: 4 / 3; border-radius: 9px; background: linear-gradient(135deg, #3b4350, #20242b); position: relative; overflow: hidden; }
.bfv-shot:nth-child(2) { background: linear-gradient(135deg, #4a3f35, #23201d); }
.bfv-shot:nth-child(3) { background: linear-gradient(135deg, #34413a, #1c221f); }
.bfv-shot small { position: absolute; left: 6px; bottom: 5px; font-size: 9px; color: rgba(255,255,255,0.75); }
.bfv-partrow { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 9px; background: #1a1a1c; font-size: 12px; }
.bfv-partrow b { color: rgba(255,255,255,0.55); font-weight: 600; margin-right: 8px; }
.bfv-sig { position: relative; height: 82px; border-radius: 10px; background: #fcfcfc; }
.bfv-sig svg { position: absolute; inset: 8px 12px 20px; width: calc(100% - 24px); height: calc(100% - 28px); }
.bfv-sig path { fill: none; stroke: #1a1a1c; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.bfv-sig small { position: absolute; left: 12px; bottom: 5px; font-size: 9px; color: #6b6b72; }
.bfv-stamp {
  position: absolute; right: 16px; bottom: 30px; padding: 6px 14px; border-radius: 10px;
  border: 3px solid var(--bsh-boshed); color: var(--bsh-boshed); background: rgba(18,18,20,0.85);
  font-weight: 900; font-size: 22px; letter-spacing: 0.06em; transform: rotate(-8deg); opacity: 0;
}

/* 04 get paid */
.bfv-inv { display: grid; gap: 8px; }
.bfv-inv-top { display: flex; justify-content: space-between; align-items: center; }
.bfv-inv-top b { font-size: 14px; }
.bfv-line { display: flex; justify-content: space-between; font-size: 12px; color: rgba(255,255,255,0.75); }
.bfv-total { display: flex; justify-content: space-between; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.08); font-weight: 700; font-size: 14px; }
.bfv-paybtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bfv-paybtns span { display: grid; place-items: center; height: 34px; border-radius: 9px; border: 1px solid rgba(255,255,255,0.14); font-size: 11.5px; color: rgba(255,255,255,0.8); }
.bfv-paybtns span.hit { background: #fcfcfc; color: #1a1a1c; }
.bfv-sms { padding: 9px 12px; border-radius: 14px 14px 14px 5px; background: #26262b; font-size: 12px; line-height: 1.4; opacity: 0; }
.bfv-sms small { display: block; margin-bottom: 3px; font-size: 9.5px; color: rgba(255,255,255,0.5); }
.bfv-sms u { text-decoration-color: rgba(255,255,255,0.45); }

@media (prefers-reduced-motion: reduce) {
  .bfv-field b.typing::after { animation: none; }
}
