/* Shop Window: the animation on /websites/. One 16-second loop, all CSS:
   snap a photo on the phone, add a price and post, it appears on the shop's
   own website among the other stock, the page scrolls, a link is shared,
   a buyer adds it to the cart, the owner is told it sold, and it comes off
   the list. Less motion, when asked, shows the finished listing still. */
.sw-demo { --sw: 16s; position: relative; display: grid; grid-template-columns: 290px 1fr; gap: 44px; align-items: center;
  margin-top: 8px; padding: 36px; border-radius: 20px; background: linear-gradient(135deg, var(--alt), color-mix(in srgb, var(--accent) 7%, var(--alt)));
  border: 1px solid var(--line); overflow: hidden; }
.sw-demo * { box-sizing: border-box; }
.sw-demo .a { animation-duration: var(--sw); animation-iteration-count: infinite; animation-timing-function: ease-in-out; }

/* ── The phone ── */
.sw-phone { position: relative; width: 270px; height: 540px; padding: 12px; border-radius: 42px; background: #0d1117;
  box-shadow: 0 30px 60px -24px rgba(5, 7, 10, 0.55), inset 0 0 0 2px #2a3240; justify-self: center; }
.sw-phone::before { content: ""; position: absolute; top: 20px; left: 50%; width: 76px; height: 20px; margin-left: -38px; border-radius: 12px; background: #0d1117; z-index: 5; }
.sw-screen { position: relative; height: 100%; border-radius: 31px; overflow: hidden; background: #fff; color: #121820; font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.sw-layer { position: absolute; inset: 0; opacity: 0; }

/* 1. The camera */
.sw-cam { background: radial-gradient(120% 80% at 50% 40%, #6b5844, #2b231b 70%); animation-name: sw-cam; }
@keyframes sw-cam { 0%, 16% { opacity: 1; } 19%, 100% { opacity: 0; } }
.sw-shelf { position: absolute; left: 0; right: 0; top: 330px; height: 90px; background: linear-gradient(#8a6a48, #5a432c); }
.sw-cam .sw-lamp { position: absolute; left: 50%; top: 150px; width: 130px; margin-left: -65px; }
.sw-focus { position: absolute; left: 50%; top: 135px; width: 170px; height: 220px; margin-left: -85px;
  background:
    linear-gradient(#ffd34d, #ffd34d) 0 0 / 22px 3px, linear-gradient(#ffd34d, #ffd34d) 0 0 / 3px 22px,
    linear-gradient(#ffd34d, #ffd34d) 100% 0 / 22px 3px, linear-gradient(#ffd34d, #ffd34d) 100% 0 / 3px 22px,
    linear-gradient(#ffd34d, #ffd34d) 0 100% / 22px 3px, linear-gradient(#ffd34d, #ffd34d) 0 100% / 3px 22px,
    linear-gradient(#ffd34d, #ffd34d) 100% 100% / 22px 3px, linear-gradient(#ffd34d, #ffd34d) 100% 100% / 3px 22px;
  background-repeat: no-repeat; animation-name: sw-focus; }
@keyframes sw-focus { 0% { transform: scale(1.25); opacity: 0; } 5% { opacity: 1; } 10%, 100% { transform: scale(1); opacity: 1; } }
.sw-shutter { position: absolute; left: 50%; bottom: 34px; width: 64px; height: 64px; margin-left: -32px; border-radius: 50%; border: 4px solid #fff; animation-name: sw-shutter; }
.sw-shutter::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
@keyframes sw-shutter { 0%, 12% { transform: scale(1); } 13.5% { transform: scale(0.86); } 15%, 100% { transform: scale(1); } }
.sw-camlabel { position: absolute; top: 56px; left: 0; right: 0; text-align: center; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; opacity: 0.8; }
.sw-flash { position: absolute; inset: 0; background: #fff; opacity: 0; animation-name: sw-flash; z-index: 4; }
@keyframes sw-flash { 0%, 13.5% { opacity: 0; } 14.5% { opacity: 0.95; } 18%, 100% { opacity: 0; } }

/* 2. Name, price, post */
.sw-form { padding: 52px 18px 18px; background: #f5f7fa; animation-name: sw-form; }
@keyframes sw-form { 0%, 16% { opacity: 0; } 19%, 40% { opacity: 1; } 43%, 100% { opacity: 0; } }
.sw-app-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-weight: 800; font-size: 15px; }
.sw-app-top span { color: #c2410c; font-size: 13px; }
.sw-photo { height: 170px; border-radius: 14px; background: radial-gradient(120% 80% at 50% 40%, #6b5844, #2b231b 70%); display: grid; place-items: center; overflow: hidden; }
.sw-photo .sw-lamp { width: 92px; }
.sw-field { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid #d0d7de; }
.sw-field small { display: block; color: #6b7783; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.sw-type { display: inline-block; overflow: hidden; white-space: nowrap; vertical-align: bottom; font-weight: 700; width: 0; border-right: 2px solid transparent; }
.sw-t1 { animation-name: sw-t1; animation-timing-function: steps(16, end) !important; }
@keyframes sw-t1 { 0%, 21% { width: 0; border-color: #c2410c; } 27% { width: 15ch; border-color: #c2410c; } 28%, 100% { width: 15ch; border-color: transparent; } }
.sw-t2 { animation-name: sw-t2; animation-timing-function: steps(3, end) !important; }
@keyframes sw-t2 { 0%, 28.5% { width: 0; border-color: #c2410c; } 31% { width: 3.2ch; border-color: #c2410c; } 32%, 100% { width: 3.2ch; border-color: transparent; } }
.sw-post { position: relative; margin-top: 14px; height: 46px; border-radius: 12px; background: #c2410c; color: #fff; font-weight: 800; display: grid; place-items: center; animation-name: sw-post; }
@keyframes sw-post { 0%, 33% { transform: scale(1); background: #c2410c; } 34.5% { transform: scale(0.95); background: #9a3412; } 36%, 100% { transform: scale(1); background: #1a7f37; } }
.sw-post span { position: absolute; }
.sw-post .p1 { animation-name: sw-p1; } .sw-post .p2 { opacity: 0; animation-name: sw-p2; }
@keyframes sw-p1 { 0%, 35% { opacity: 1; } 36%, 100% { opacity: 0; } }
@keyframes sw-p2 { 0%, 35% { opacity: 0; } 36%, 100% { opacity: 1; } }

/* 3. The owner's list, and the "sold" notice */
.sw-mine { padding: 52px 16px 16px; background: #f5f7fa; animation-name: sw-mine; }
@keyframes sw-mine { 0%, 40% { opacity: 0; } 43%, 95% { opacity: 1; } 99%, 100% { opacity: 0; } }
.sw-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 8px; margin-top: 8px; border-radius: 12px; background: #fff; border: 1px solid #e3e7ec; }
.sw-row .th { width: 42px; height: 42px; border-radius: 9px; display: grid; place-items: center; overflow: hidden; }
.sw-row b, .sw-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-row b { font-size: 12px; letter-spacing: -0.01em; } .sw-row small { color: #6b7783; font-size: 11.5px; }
.sw-chip { padding: 3px 7px; border-radius: 999px; font-size: 10.5px; white-space: nowrap; font-weight: 800; background: rgba(26, 127, 55, 0.12); color: #1a7f37; position: relative; }
.sw-chip .c2 { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 999px; background: #c2410c; color: #fff; opacity: 0; animation-name: sw-soldchip; }
@keyframes sw-soldchip { 0%, 76% { opacity: 0; } 78%, 100% { opacity: 1; } }
.sw-share { margin-top: 14px; display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px dashed #aeb8c3; font-size: 12px; font-weight: 700; color: #4f5b67; white-space: nowrap; }
.sw-share svg { width: 16px; height: 16px; fill: none; stroke: #c2410c; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sw-copied { margin-left: auto; color: #1a7f37; opacity: 0; animation-name: sw-copied; }
@keyframes sw-copied { 0%, 52% { opacity: 0; } 54%, 64% { opacity: 1; } 67%, 100% { opacity: 0; } }
.sw-note { position: absolute; left: 10px; right: 10px; top: 44px; padding: 12px 14px; border-radius: 16px; background: rgba(18, 24, 32, 0.94); color: #fff;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5); transform: translateY(-160%); animation-name: sw-note; font-size: 12.5px; z-index: 3; }
.sw-note b { display: block; font-size: 13.5px; }
@keyframes sw-note { 0%, 74% { transform: translateY(-160%); } 77%, 90% { transform: translateY(0); } 94%, 100% { transform: translateY(-160%); } }

/* ── The shop's own website ── */
.sw-site { position: relative; height: 470px; border-radius: 16px; overflow: hidden; background: #fff; color: #121820;
  box-shadow: 0 30px 60px -28px rgba(5, 7, 10, 0.45); border: 1px solid #d0d7de; font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.sw-bar { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; background: #eef1f4; border-bottom: 1px solid #d0d7de; }
.sw-bar i { width: 11px; height: 11px; border-radius: 50%; background: #d0d7de; }
.sw-url { margin-left: 12px; flex: 1; max-width: 320px; height: 24px; border-radius: 6px; background: #fff; display: flex; align-items: center; padding: 0 10px; color: #4f5b67; font-size: 12.5px; }
.sw-head { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid #e3e7ec; }
.sw-head b { font-size: 19px; font-family: Georgia, "Times New Roman", serif; }
.sw-head span { color: #6b7783; font-size: 13px; }
.sw-view { position: absolute; top: 96px; left: 0; right: 0; bottom: 0; overflow: hidden; }
.sw-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 16px 20px; animation-name: sw-scroll; }
@keyframes sw-scroll { 0%, 47% { transform: translateY(0); } 55%, 59% { transform: translateY(-190px); } 66%, 100% { transform: translateY(0); } }
.sw-card { position: relative; border-radius: 12px; border: 1px solid #e3e7ec; background: #fff; overflow: visible; }
.sw-card .ph { height: 104px; border-radius: 11px 11px 0 0; display: grid; place-items: center; overflow: hidden; }
.sw-card .in { padding: 8px 10px 10px; }
.sw-card b { display: block; font-size: 13px; }
.sw-card .pr { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; font-weight: 800; color: #c2410c; }
.sw-card .pr small { color: #6b7783; font-weight: 600; font-size: 11px; }
.sw-cart { margin-top: 8px; height: 30px; border-radius: 8px; background: #121820; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; position: relative; }
.sw-slot { position: relative; min-height: 236px; border: 2px dashed #d0d7de; border-radius: 12px; display: grid; place-items: center; color: #aeb8c3; font-weight: 700; font-size: 12.5px; }
.sw-new { position: absolute; inset: -2px; color: #121820; opacity: 0; animation-name: sw-new; transform-origin: 30% 30%; }
@keyframes sw-new { 0%, 41% { opacity: 0; transform: scale(0.6) translate(-40px, -30px); } 45% { opacity: 1; transform: scale(1.05); } 47%, 79% { opacity: 1; transform: scale(1); }
  83% { opacity: 1; transform: scale(1); } 89%, 100% { opacity: 0; transform: scale(0.85); } }
.sw-badge { position: absolute; left: 8px; top: 8px; padding: 3px 8px; border-radius: 999px; background: #c2410c; color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; z-index: 1; }
.sw-new .sw-cart { animation-name: sw-cartbtn; }
@keyframes sw-cartbtn { 0%, 69.5% { background: #121820; transform: scale(1); } 70.5% { transform: scale(0.94); background: #c2410c; } 72%, 100% { background: #c2410c; transform: scale(1); } }
.sw-new .sw-cart .k1 { animation-name: sw-p1x; } .sw-new .sw-cart .k2 { position: absolute; opacity: 0; animation-name: sw-p2x; }
@keyframes sw-p1x { 0%, 70.5% { opacity: 1; } 71%, 100% { opacity: 0; } }
@keyframes sw-p2x { 0%, 70.5% { opacity: 0; } 71%, 100% { opacity: 1; } }
.sw-new .stock { animation-name: sw-stock; }
@keyframes sw-stock { 0%, 75% { opacity: 1; } 76%, 100% { opacity: 0; } }
.sw-stamp { position: absolute; left: 50%; top: 34px; margin-left: -54px; width: 108px; padding: 6px 0; text-align: center; border: 3px solid #c2410c; border-radius: 8px;
  color: #c2410c; background: rgba(255, 255, 255, 0.9); font-weight: 900; font-size: 18px; letter-spacing: 0.14em; transform: rotate(-12deg) scale(1.6); opacity: 0; animation-name: sw-stamp; z-index: 2; }
@keyframes sw-stamp { 0%, 75% { opacity: 0; transform: rotate(-12deg) scale(1.6); } 77%, 86% { opacity: 1; transform: rotate(-12deg) scale(1); } 89%, 100% { opacity: 0; } }
.sw-cursor { position: absolute; left: 330px; top: 230px; width: 26px; height: 26px; opacity: 0; animation-name: sw-cursor; z-index: 3; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3)); }
@keyframes sw-cursor { 0%, 62% { opacity: 0; transform: translate(0, 0); } 64% { opacity: 1; transform: translate(0, 0); }
  69% { opacity: 1; transform: translate(-211px, 58px) scale(1); } 70.5% { transform: translate(-211px, 58px) scale(0.85); } 72%, 76% { opacity: 1; transform: translate(-211px, 58px) scale(1); } 80%, 100% { opacity: 0; transform: translate(-211px, 58px); } }
.sw-sold-left { position: absolute; inset: 0; display: grid; place-items: center; color: #aeb8c3; font-weight: 800; letter-spacing: 0.1em; font-size: 12.5px; }

/* ── The five steps under it ── */
.sw-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; counter-reset: sw; }
.sw-steps li { position: relative; padding: 14px 16px 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--muted);
  font-size: 16px; font-weight: 600; counter-increment: sw; }
.sw-steps li::before { content: counter(sw); display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 10px; border-radius: 50%;
  background: var(--alt); color: var(--faint); font-size: 13px; font-weight: 800; }
.sw-steps li { animation-duration: 16s; animation-iteration-count: infinite; }
.sw-steps li:nth-child(1) { animation-name: sw-s1; } .sw-steps li:nth-child(2) { animation-name: sw-s2; } .sw-steps li:nth-child(3) { animation-name: sw-s3; }
.sw-steps li:nth-child(4) { animation-name: sw-s4; } .sw-steps li:nth-child(5) { animation-name: sw-s5; }
@keyframes sw-s1 { 0%, 17% { border-color: var(--accent); color: var(--text); background: var(--accent-soft); } 19%, 100% { border-color: var(--line); color: var(--muted); background: var(--card); } }
@keyframes sw-s2 { 0%, 18% { border-color: var(--line); color: var(--muted); background: var(--card); } 19%, 40% { border-color: var(--accent); color: var(--text); background: var(--accent-soft); } 42%, 100% { border-color: var(--line); color: var(--muted); background: var(--card); } }
@keyframes sw-s3 { 0%, 41% { border-color: var(--line); color: var(--muted); background: var(--card); } 42%, 51% { border-color: var(--accent); color: var(--text); background: var(--accent-soft); } 53%, 100% { border-color: var(--line); color: var(--muted); background: var(--card); } }
@keyframes sw-s4 { 0%, 52% { border-color: var(--line); color: var(--muted); background: var(--card); } 53%, 64% { border-color: var(--accent); color: var(--text); background: var(--accent-soft); } 66%, 100% { border-color: var(--line); color: var(--muted); background: var(--card); } }
@keyframes sw-s5 { 0%, 65% { border-color: var(--line); color: var(--muted); background: var(--card); } 66%, 94% { border-color: var(--accent); color: var(--text); background: var(--accent-soft); } 97%, 100% { border-color: var(--line); color: var(--muted); background: var(--card); } }

.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Less motion: the posted lamp on the site and the owner's list, still. */
@media (prefers-reduced-motion: reduce) {
  .sw-demo .a, .sw-steps li { animation: none !important; }
  .sw-cam, .sw-form, .sw-flash, .sw-note, .sw-cursor, .sw-stamp, .sw-copied, .sw-chip .c2 { opacity: 0 !important; }
  .sw-mine, .sw-new { opacity: 1 !important; transform: none !important; }
  .sw-t1 { width: 15ch; } .sw-t2 { width: 3.2ch; }
}

/* Phones: the same scene, the words a little bigger. */
.phone .sw-steps li { font-size: 22px; }
