/* "Demo your website" pop-up: a glass card per step over a blurred page. Monochrome, spring-eased, interruptible. */
.flow {
  --ease: cubic-bezier(.32, .72, 0, 1);
  width: min(540px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); margin: auto; padding: 0; border: 0;
  background: transparent; color: #111; overflow: visible;
  font: 400 14px/1.5 "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
.flow:not([open]) { display: none; }
.flow::backdrop { background: rgba(255, 255, 255, 0); -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); transition: background-color .5s var(--ease), backdrop-filter .5s var(--ease), -webkit-backdrop-filter .5s var(--ease); }
.flow.is-open::backdrop { background: rgba(255, 255, 255, .3); -webkit-backdrop-filter: blur(26px) saturate(150%); backdrop-filter: blur(26px) saturate(150%); }
html.flow-open { overflow: hidden; }

.flow-card {
  position: relative; padding: 26px 28px 22px; border: 1px solid rgba(255, 255, 255, .72); border-radius: 32px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .42));
  -webkit-backdrop-filter: blur(40px) saturate(200%); backdrop-filter: blur(40px) saturate(200%);
  box-shadow: 0 40px 100px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .06), inset 0 1px 0 rgba(255, 255, 255, .9);
  opacity: 0; transform: translateY(18px) scale(.94); filter: blur(12px);
  transition: opacity .35s ease, transform .6s var(--ease), filter .45s ease;
}
.flow.is-open .flow-card { opacity: 1; transform: none; filter: none; }   /* filter:none keeps the backdrop blur working */

.flow-x { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: #111; cursor: pointer; transition: background-color .2s, transform .12s ease-out; }
.flow-x:hover { background: rgba(0, 0, 0, .07); }
.flow-x:active { transform: scale(.92); }
.flow-progress { display: flex; gap: 6px; margin: 0 44px 24px 0; }
.flow-progress i { position: relative; flex: 1; height: 3px; border-radius: 3px; overflow: hidden; background: rgba(0, 0, 0, .1); }
.flow-progress i::after { content: ""; position: absolute; inset: 0; background: #111; transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.flow-progress i.is-done::after { transform: none; }

.flow-error { margin: 0 0 14px; padding: 10px 14px; border-radius: 14px; background: rgba(17, 17, 17, .08); font-size: 13px; }

.step { display: grid; gap: 16px; align-content: start; min-height: 220px; }
.step[hidden] { display: none; }
.step h2 { margin: 0; font-size: clamp(24px, 4.4vw, 30px); font-weight: 600; letter-spacing: -.035em; line-height: 1.1; }
.flow-eyebrow { margin: 0; color: #6e6e73; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.flow-hint { margin: 0; color: #6e6e73; font-size: 12px; }
.flow-hint kbd { display: inline-block; min-width: 20px; padding: 0 5px; border-radius: 5px; background: rgba(0, 0, 0, .07); font: inherit; text-align: center; }

.flow-input { width: 100%; padding: 8px 0 10px; border: 0; border-bottom: 1.5px solid rgba(0, 0, 0, .2); border-radius: 0; background: transparent; color: #111; outline: 0; caret-color: #111; font: 500 clamp(30px, 6.4vw, 44px)/1.1 inherit; letter-spacing: -.04em; transition: border-color .3s; }
.flow-input:focus { border-bottom-color: #111; }
.flow-input::placeholder { color: rgba(0, 0, 0, .28); }

.flow-drop { position: relative; display: grid; place-items: center; align-content: center; gap: 6px; min-height: 150px; padding: 22px; border: 1.5px dashed rgba(0, 0, 0, .22); border-radius: 22px; background: rgba(255, 255, 255, .4); text-align: center; cursor: pointer; transition: border-color .25s, background-color .25s, transform .4s var(--ease); }
.flow-drop:hover, .flow-drop.is-over { border-color: #111; background: rgba(255, 255, 255, .7); }
.flow-drop.is-over { transform: scale(1.015); }
.flow-drop:focus-within { outline: 2px solid #111; outline-offset: 3px; }
.flow-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.flow-drop-title { font-weight: 500; }

.flow-preview { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 18px; background: rgba(255, 255, 255, .6); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.flow-preview[hidden], .flow-thumbs[hidden] { display: none; }
.flow-preview img { flex: none; height: 44px; width: auto; max-width: 140px; object-fit: contain; }
.flow-file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #6e6e73; font-size: 12px; }
.flow-link { padding: 6px 4px; border: 0; background: none; color: #111; font: inherit; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.flow-thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.flow-thumb { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 12px; background: #e9e9ec; animation: flow-in .45s var(--ease) both; }
.flow-thumb img { width: 100%; height: 100%; object-fit: cover; }
.flow-thumb button { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .88); color: #111; font-size: 13px; line-height: 1; cursor: pointer; }
@keyframes flow-in { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }

.flow-layouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.flow-layout { position: relative; display: grid; gap: 4px; align-content: start; padding: 10px; border-radius: 20px; background: rgba(255, 255, 255, .5); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); cursor: pointer; transition: box-shadow .25s, transform .45s var(--ease); }
.flow-layout:hover { transform: translateY(-2px); }
.flow-layout:active { transform: scale(.98); }
.flow-layout.is-on { box-shadow: inset 0 0 0 2px #111; }
.flow-layout:focus-within { outline: 2px solid #111; outline-offset: 3px; }
.flow-layout input { position: absolute; opacity: 0; pointer-events: none; }
.flow-layout strong { margin-top: 6px; font-size: 13px; font-weight: 600; letter-spacing: -.01em; }
.flow-layout small { color: #6e6e73; font-size: 11px; line-height: 1.35; }
.wf { display: grid; gap: 3px; aspect-ratio: 4 / 3; padding: 7px; border-radius: 12px; background: #f1f1f3; overflow: hidden; }
.wf i { display: block; border-radius: 2px; background: #d5d5da; }
.wf-studio { grid-template-columns: repeat(4, 1fr); grid-template-rows: 2fr 1fr; }
.wf-studio i:nth-child(1) { grid-column: 1 / -1; background: #111; }
.wf-studio i:nth-child(n+6) { display: none; }
.wf-gallery { grid-template-columns: 1.3fr 1fr; grid-template-rows: repeat(3, 1fr); }
.wf-gallery i:nth-child(1) { grid-row: 1 / 3; background: #111; }
.wf-gallery i:nth-child(2) { grid-row: 1 / 4; grid-column: 2; }
.wf-gallery i:nth-child(n+4) { display: none; }
.wf-market { grid-template-columns: repeat(4, 1fr); grid-template-rows: 5px 1fr 1fr; }
.wf-market i:nth-child(1) { grid-column: 1 / -1; background: #111; }

.flow-privacy { margin: 0; color: #6e6e73; font-size: 11px; line-height: 1.5; }
.flow-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.flow-nav { display: flex; align-items: center; gap: 8px; margin-top: 22px; }
.flow-nav [hidden] { display: none; }
.flow-spacer { flex: 1; }
.flow-btn { min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px; font: inherit; font-weight: 500; cursor: pointer; transition: transform .12s ease-out, opacity .2s, background-color .2s; }
.flow-btn:active { transform: scale(.97); }
.flow-btn:disabled { opacity: .5; cursor: wait; }
.flow-btn--solid { background: #111; color: #fff; }
.flow-btn--solid:hover:not(:disabled) { opacity: .86; }
.flow-btn--ghost { background: rgba(0, 0, 0, .06); color: #111; }
.flow-btn--ghost:hover { background: rgba(0, 0, 0, .1); }
.flow-btn--plain { background: none; color: #6e6e73; }
.flow-btn--plain:hover { color: #111; }
.flow :focus-visible { outline: 2px solid #111; outline-offset: 3px; }

.flow.is-shake .flow-card { animation: flow-shake .4s var(--ease); }
@keyframes flow-shake { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }

@media (max-width: 560px) {
  .flow { margin: auto auto 12px; }
  .flow-card { padding: 22px 20px 18px; border-radius: 28px; }
  .flow-thumbs { grid-template-columns: repeat(3, 1fr); }
  .flow-layouts { gap: 6px; }
  .flow-layout { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .flow::backdrop, .flow-card { transition: opacity .2s; transform: none; filter: none; }
  .flow-progress i::after, .flow-drop, .flow-layout, .flow-btn, .flow-input { transition: none; }
  .flow-thumb, .flow.is-shake .flow-card { animation: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .flow-card { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .flow.is-open::backdrop { background: rgba(255, 255, 255, .85); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .flow-card { background: #fff; box-shadow: 0 0 0 2px #000; }
  .flow-hint, .flow-eyebrow, .flow-layout small, .flow-privacy, .flow-file-name { color: #333; }
  .flow-drop { border-color: #000; }
}
