/* ============================================================
   Demo frames: the device a demo lives in (demos page).
   Only the "Tap to try" hint lives here for now; no device frames are built.
   Colours follow docs/design-system.md: ink, white, grey.
   ============================================================ */

.df-stage {
  --df-ease: cubic-bezier(0.23, 1, 0.32, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* ---------- "Sample business: Thrust" pill above every demo (same pill as the hero badge, logo instead of text) ---------- */
.df-sample {
  margin: 0 auto;
  background: #fff;
  padding: 11px 22px 11px 19px;
  gap: 12px;
  animation: df-rise 650ms var(--df-ease, cubic-bezier(0.23, 1, 0.32, 1)) both;
}
.df-sample { position: relative; top: -10px; }
.df-sample-logo { height: 17px; width: auto; display: block; }
.df-sample .dot { width: 8px; height: 8px; box-shadow: 0 0 0 4px rgba(35,163,91,.18); }
.dv-space:not([data-frame]) { display: flex; justify-content: center; align-items: flex-start; }

/* ---------- phone (picture of a phone with a see-through screen; the demo sits behind it) ---------- */
.dv-space[data-frame="phone"] {
  height: auto;
  margin-top: clamp(72px, 8vw, 120px);
  margin-bottom: clamp(88px, 10vw, 160px);
}
.df-phone {
  --df-w: clamp(220px, min(23vw, calc((100svh - 150px) / 2.05)), 318px);
  position: relative;
  width: var(--df-w);
  aspect-ratio: 826 / 1693;
  animation: df-rise 650ms var(--df-ease) both;
}
.df-phone::before {
  content: "";
  position: absolute;
  inset: 1%;
  z-index: 0;
  border-radius: 16.5% / 8%;
  box-shadow:
    0 1px 2px rgba(11, 11, 12, 0.22),
    0 6px 10px -2px rgba(11, 11, 12, 0.18),
    0 22px 34px -10px rgba(11, 11, 12, 0.28),
    0 60px 80px -24px rgba(11, 11, 12, 0.36);
  pointer-events: none;
}
.df-screen {
  position: absolute;
  z-index: 1;
  left: 5.57%;
  right: 5.69%;
  top: 2.24%;
  bottom: 2.36%;
  overflow: hidden;
  border-radius: calc(var(--df-w) * 0.075);
  background: transparent;
  color: #141311;
  isolation: isolate;
}
.df-phone-img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
}

/* ---------- window frame (laptop-type demos) ---------- */
.dv-space[data-frame="window"] {
  height: auto;
  margin-top: clamp(72px, 8vw, 120px);
  margin-bottom: clamp(100px, 11vw, 180px);
}
.dv-space[data-frame="window"] .df-stage { gap: clamp(30px, 3.4vw, 48px); }
.df-window {
  position: relative;
  width: min(1180px, 100%);
  aspect-ratio: 16 / 9;
  border-radius: clamp(16px, 1.9vw, 26px);
  background: rgba(255, 255, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(11, 11, 12, 0.10),
    0 1px 2px rgba(11, 11, 12, 0.10),
    0 8px 14px -4px rgba(11, 11, 12, 0.12),
    0 30px 50px -18px rgba(11, 11, 12, 0.22),
    0 70px 110px -34px rgba(11, 11, 12, 0.32);
  animation: df-rise 650ms var(--df-ease) both;
}
.df-win-screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  color: #141311;
  isolation: isolate;
}
@media (max-width: 640px) {
  .df-window { aspect-ratio: 4 / 5; border-radius: 18px; }
}

/* ---------- "Tap to try" hint ---------- */
.df-hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--font-mono, 'JetBrains Mono', ui-monospace, monospace);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6e6b63;
  transition: opacity 260ms ease-out, transform 260ms var(--df-ease);
  animation: df-rise 650ms var(--df-ease) 220ms backwards;
}
.df-hint-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #141311;
}
.df-hint-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid #141311;
  animation: df-ping 1800ms var(--df-ease) 900ms 3 both;
}
.df-hint-pointer { display: none; }
@media (hover: hover) and (pointer: fine) {
  .df-hint-touch { display: none; }
  .df-hint-pointer { display: inline; }
}

/* nothing to try yet: no hint */
.df-stage:not(:has(.df-screen:not(:empty), .df-win-screen:not(:empty))) .df-hint { display: none; }

/* first touch inside the demo: the hint steps aside */
.df-stage.is-tried .df-hint { opacity: 0; transform: translateY(-4px); pointer-events: none; }

@keyframes df-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes df-ping {
  from { opacity: 0.55; transform: scale(1); }
  to { opacity: 0; transform: scale(3.2); }
}

@media (prefers-reduced-motion: reduce) {
  .df-phone, .df-window, .df-hint, .df-sample { animation: none; }
  .df-hint-dot::after { animation: none; opacity: 0; }
  .df-hint { transition: opacity 120ms linear; }
}


[data-lenis-prevent] { overscroll-behavior: contain; }

@media (max-width: 700px) { .df-phone { --df-w: min(72vw, 300px, calc((100svh - 150px) / 2.05)); } }
@media (max-width: 700px) { .dv-space .rc-stage { --rc-w: min(72vw, 300px, calc((100svh - 150px) / 2.05)); } }
