/*
 * Homepage section 06: setup steps beside a browser that plays them.
 *
 * Static by default (reduced motion, print): every step lit, the browser
 * showing the end state, the chat live on the site. When motion is allowed it
 * replays on one 22 s loop:
 *
 *   0-3.6 s     step 1  the account form, the business name typed in
 *   3.6-9 s     step 2  the website address typed, a progress bar, four pages read
 *   9-14.5 s    step 3  the site with its one-line snippet; the chat opens
 *   14.5-17.7 s or      no website: "Live now", its own link and a QR code
 *   17.7-21.3 s or      the customer opens that link and the chat is there
 *
 * The address bar follows the scene. Pure CSS, no script.
 */
.in-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 64px; align-items: center; }
.in-steps { list-style: none; margin: 0; padding: 0; }
.in-step {
  display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: baseline;
  padding: 14px 0; border-top: 1px solid var(--border);
}
.in-step:last-child { border-bottom: 1px solid var(--border); }
.in-n { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--teal); }
.in-step b { display: block; font-family: var(--archivo); font-size: 1.05rem; }
.in-step span:not(.in-n) { display: block; margin-top: 2px; color: var(--text-muted); font-size: .95rem; }

.in-browser {
  background: var(--panel); border: 1px solid var(--border-strong); border-radius: 16px;
  overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.in-bar {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  background: #11181a; border-bottom: 1px solid var(--border);
}
.in-dots { display: flex; gap: 6px; }
.in-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.in-url {
  flex: 1; padding: 5px 12px; border-radius: 99px; background: rgba(255, 255, 255, .05);
  font-family: var(--mono); font-size: 11px; color: var(--text-muted);
}
.in-ex {
  font-family: var(--mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-muted); border: 1px solid var(--border-strong); border-radius: 99px; padding: 3px 8px;
}
.in-url { display: grid; }
.in-url > span { grid-area: 1 / 1; }
.in-url-app, .in-url-talk { opacity: 0; }
.in-stage { position: relative; height: 360px; }
.in-scene { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; }
.in-scene-1, .in-scene-2, .in-scene-4, .in-scene-5 { opacity: 0; }

.in-card {
  width: 100%; max-width: 360px; padding: 22px; border-radius: 14px;
  background: var(--panel-raised); border: 1px solid var(--border);
}
.in-card-title { font-family: var(--archivo); font-weight: 800; font-size: 1.1rem; margin-bottom: 14px; }
.in-field { margin-top: 12px; }
.in-field > span { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 5px; }
.in-input {
  padding: 9px 12px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: rgba(0, 0, 0, .25); font-size: 13px; white-space: nowrap; overflow: hidden;
}
.in-type { display: inline-block; overflow: hidden; vertical-align: bottom; white-space: nowrap; }
.in-btn {
  margin-top: 16px; padding: 10px; border-radius: 8px; text-align: center;
  background: var(--text); color: var(--bg); font-weight: 600; font-size: 13px;
}
.in-input-url { font-family: var(--mono); font-size: 12px; }
.in-progress { height: 4px; margin: 14px 0 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.in-progress span { display: block; height: 100%; width: 100%; background: var(--teal); }
.in-pages { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.in-page { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.in-page::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%; flex: none; background: var(--ok);
  -webkit-mask: radial-gradient(circle, #000 60%, transparent 61%); mask: radial-gradient(circle, #000 60%, transparent 61%);
}
.in-ready {
  margin-top: 14px; font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ok);
}

.in-site {
  position: relative; width: 100%; height: 100%; border-radius: 10px; overflow: hidden;
  background: #f4f5f4; color: #14181a;
}
.in-site-nav { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #e3e6e5; font-size: 13px; }
.in-site-nav b { margin-right: auto; font-family: var(--archivo); }
.in-site-nav span { width: 36px; height: 7px; border-radius: 4px; background: #d9dedc; }
.in-site-hero { padding: 26px 16px; display: grid; gap: 9px; }
.in-site-hero i { display: block; height: 12px; border-radius: 6px; background: #d9dedc; width: 80%; }
.in-site-hero i:first-child { height: 20px; width: 62%; background: #c7cecb; }
.in-site-hero .in-short { width: 45%; }
.in-code {
  position: absolute; left: 12px; right: 12px; bottom: 12px; display: block; padding: 8px 10px;
  border-radius: 8px; background: #14181a; color: #9fe6dd; font-family: var(--mono); font-size: 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.in-widget { position: absolute; right: 14px; bottom: 54px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.in-widget-msg {
  max-width: 210px; padding: 10px 12px; border-radius: 14px 14px 4px 14px;
  background: #fff; color: #14181a; font-size: 12.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.in-launcher {
  width: 44px; height: 44px; border-radius: 50%; background: var(--teal);
  box-shadow: 0 8px 22px rgba(18, 181, 166, .45); position: relative;
}
.in-launcher::after {
  content: ""; position: absolute; left: 12px; top: 13px; width: 20px; height: 15px;
  border-radius: 6px 6px 6px 2px; background: #04201e;
}

/* No website: the account's own page, its link and QR code, then the page a customer opens. */
.in-live-badge {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ok);
}
.in-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.in-live-title { margin: 8px 0 14px; font-family: var(--archivo); font-weight: 800; font-size: 1.05rem; }
.in-live-body { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 16px; align-items: center; }
.in-qr { display: block; width: 104px; height: 104px; padding: 8px; border-radius: 10px; background: #fff; }
.in-qr svg { display: block; width: 100%; height: 100%; }
.in-live { max-width: 400px; }
.in-live-url {
  display: block; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: rgba(0, 0, 0, .3); font-family: var(--mono); font-size: 10.5px; overflow-wrap: anywhere;
}
.in-live-btns { display: flex; gap: 8px; margin-top: 10px; }
.in-live-btns span {
  padding: 6px 12px; border-radius: 99px; border: 1px solid var(--border-strong);
  color: var(--text-muted); font-size: 11px;
}
.in-live-btns span:first-child { background: var(--text); border-color: transparent; color: var(--bg); font-weight: 600; }
.in-live-share { margin-top: 14px; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; color: var(--text-muted); }

.in-talk {
  display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; height: 100%;
  padding: 20px 18px; border-radius: 10px; overflow: hidden; color: #14181a;
  background: radial-gradient(90% 60% at 50% 0%, rgba(18, 181, 166, .18), transparent 70%), #f4f5f7;
}
.in-talk-head { text-align: center; }
.in-talk-initial {
  display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px;
  border-radius: 50%; background: var(--teal); color: #fff; font-size: 21px; font-weight: 700;
}
.in-talk-head b { display: block; margin-top: 8px; font-family: var(--archivo); font-size: 1.1rem; }
.in-talk-head small { display: block; margin-top: 2px; color: #5b6168; font-size: 12px; }
.in-talk-chat {
  display: flex; flex-direction: column; justify-content: space-between; gap: 12px; flex: 1;
  width: 100%; max-width: 380px; padding: 14px; border-radius: 14px; background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
}
.in-talk-chat .in-widget-msg { align-self: flex-start; background: #eef0f1; box-shadow: none; border-radius: 14px 14px 14px 4px; }
.in-talk-input { padding: 9px 12px; border-radius: 99px; border: 1px solid #d9dedc; color: #7a8187; font-size: 12.5px; }

@media (max-width: 960px) {
  .in-grid { grid-template-columns: 1fr; gap: 44px; }
}
@media (max-width: 420px) {
  .in-stage { height: 380px; }
  .in-scene { padding: 16px; }
  .in-live-body { grid-template-columns: 88px minmax(0, 1fr); gap: 12px; }
  .in-qr { width: 88px; height: 88px; }
}

@media (prefers-reduced-motion: no-preference) {
  .in-step-1 { animation: in-step-1 22s infinite both; }
  .in-step-2 { animation: in-step-2 22s infinite both; }
  .in-step-3 { animation: in-step-3 22s infinite both; }
  .in-step-or { animation: in-step-or 22s infinite both; }
  .in-scene-1 { animation: in-scene-1 22s infinite both; }
  .in-scene-2 { animation: in-scene-2 22s infinite both; }
  .in-scene-3 { animation: in-scene-3 22s infinite both; }
  .in-scene-4 { animation: in-scene-4 22s infinite both; }
  .in-scene-5 { animation: in-scene-5 22s infinite both; }
  .in-type-name { animation: in-type-name 22s infinite both; }
  .in-type-url { animation: in-type-url 22s infinite both; }
  .in-progress span { animation: in-progress 22s infinite both; }
  .in-page-1 { animation: in-page-1 22s infinite both; }
  .in-page-2 { animation: in-page-2 22s infinite both; }
  .in-page-3 { animation: in-page-3 22s infinite both; }
  .in-page-4 { animation: in-page-4 22s infinite both; }
  .in-ready { animation: in-ready 22s infinite both; }
  .in-code { animation: in-code 22s infinite both; }
  .in-widget { animation: in-widget 22s infinite both; }
  .in-url-app { animation: in-url-app 22s infinite both; }
  .in-url-site { animation: in-url-site 22s infinite both; }
  .in-url-talk { animation: in-url-talk 22s infinite both; }

  @keyframes in-step-1 {
    0% { opacity: 1; }
    97.27% { opacity: 1; }
    98.64% { opacity: .35; }
    100% { opacity: .35; }
  }
  @keyframes in-step-2 {
    0% { opacity: .35; }
    15.68% { opacity: .35; }
    17.05% { opacity: 1; }
    97.27% { opacity: 1; }
    98.64% { opacity: .35; }
    100% { opacity: .35; }
  }
  @keyframes in-step-3 {
    0% { opacity: .35; }
    40.23% { opacity: .35; }
    41.59% { opacity: 1; }
    97.27% { opacity: 1; }
    98.64% { opacity: .35; }
    100% { opacity: .35; }
  }
  @keyframes in-step-or {
    0% { opacity: .35; }
    66.14% { opacity: .35; }
    67.5% { opacity: 1; }
    97.27% { opacity: 1; }
    98.64% { opacity: .35; }
    100% { opacity: .35; }
  }
  @keyframes in-scene-1 {
    0% { opacity: 1; transform: none; }
    15% { opacity: 1; transform: none; }
    16.36% { opacity: 0; transform: translateX(-12px); }
    100% { opacity: 0; transform: translateX(-12px); }
  }
  @keyframes in-scene-2 {
    0% { opacity: 0; transform: translateX(12px); }
    15.68% { opacity: 0; transform: translateX(12px); }
    17.05% { opacity: 1; transform: none; }
    39.55% { opacity: 1; transform: none; }
    40.91% { opacity: 0; transform: translateX(-12px); }
    100% { opacity: 0; transform: translateX(-12px); }
  }
  @keyframes in-scene-3 {
    0% { opacity: 0; transform: translateX(12px); }
    40.23% { opacity: 0; transform: translateX(12px); }
    41.59% { opacity: 1; transform: none; }
    65.45% { opacity: 1; transform: none; }
    66.82% { opacity: 0; transform: none; }
    100% { opacity: 0; transform: none; }
  }
  @keyframes in-scene-4 {
    0% { opacity: 0; transform: translateX(12px); }
    66.82% { opacity: 0; transform: translateX(12px); }
    68.18% { opacity: 1; transform: none; }
    80% { opacity: 1; transform: none; }
    81.36% { opacity: 0; transform: translateX(-12px); }
    100% { opacity: 0; transform: translateX(-12px); }
  }
  @keyframes in-scene-5 {
    0% { opacity: 0; transform: translateX(12px); }
    81.36% { opacity: 0; transform: translateX(12px); }
    82.73% { opacity: 1; transform: none; }
    95.91% { opacity: 1; transform: none; }
    97.27% { opacity: 0; transform: none; }
    100% { opacity: 0; transform: none; }
  }
  @keyframes in-type-name {
    0% { max-width: 0; }
    2.05% { max-width: 0; }
    8.18% { max-width: 14ch; }
    100% { max-width: 14ch; }
  }
  @keyframes in-type-url {
    0% { max-width: 0; }
    17.73% { max-width: 0; }
    22.5% { max-width: 18ch; }
    100% { max-width: 18ch; }
  }
  @keyframes in-progress {
    0% { width: 0; }
    23.18% { width: 0; }
    34.09% { width: 100%; }
    100% { width: 100%; }
  }
  @keyframes in-page-1 {
    0% { opacity: 0; }
    25.23% { opacity: 0; }
    25.91% { opacity: 1; }
    100% { opacity: 1; }
  }
  @keyframes in-page-2 {
    0% { opacity: 0; }
    27.95% { opacity: 0; }
    28.64% { opacity: 1; }
    100% { opacity: 1; }
  }
  @keyframes in-page-3 {
    0% { opacity: 0; }
    30.68% { opacity: 0; }
    31.36% { opacity: 1; }
    100% { opacity: 1; }
  }
  @keyframes in-page-4 {
    0% { opacity: 0; }
    33.41% { opacity: 0; }
    34.09% { opacity: 1; }
    100% { opacity: 1; }
  }
  @keyframes in-ready {
    0% { opacity: 0; }
    34.77% { opacity: 0; }
    36.14% { opacity: 1; }
    100% { opacity: 1; }
  }
  @keyframes in-code {
    0% { opacity: 0; transform: translateY(8px); }
    42.27% { opacity: 0; transform: translateY(8px); }
    44.32% { opacity: 1; transform: none; }
    100% { opacity: 1; transform: none; }
  }
  @keyframes in-widget {
    0% { opacity: 0; transform: translateY(14px) scale(.96); }
    47.73% { opacity: 0; transform: translateY(14px) scale(.96); }
    50.45% { opacity: 1; transform: none; }
    65.45% { opacity: 1; transform: none; }
    66.82% { opacity: 0; transform: none; }
    100% { opacity: 0; transform: none; }
  }
  @keyframes in-url-app {
    0% { opacity: 1; }
    40.23% { opacity: 1; }
    41.59% { opacity: 0; }
    66.14% { opacity: 0; }
    67.5% { opacity: 1; }
    80% { opacity: 1; }
    81.36% { opacity: 0; }
    96.82% { opacity: 0; }
    98.18% { opacity: 1; }
    100% { opacity: 1; }
  }
  @keyframes in-url-site {
    0% { opacity: 0; }
    40.23% { opacity: 0; }
    41.59% { opacity: 1; }
    66.14% { opacity: 1; }
    67.5% { opacity: 0; }
    100% { opacity: 0; }
  }
  @keyframes in-url-talk {
    0% { opacity: 0; }
    80% { opacity: 0; }
    81.36% { opacity: 1; }
    96.82% { opacity: 1; }
    98.18% { opacity: 0; }
    100% { opacity: 0; }
  }
}
