/* Atom Translate — phone demo (hero).
   Усередині рамки телефона — змонтований запис екрана справжнього застосунку (assets/demo/atom-demo.mp4).
   Дизайн-координати телефона: 414×836 (екран 390×812), далі масштабується через --s. */

.ad {
  --ad-bg: #f7f8fa;
  --ad-text: #22252b;
  position: relative;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  font-family: "Open Sans", "Noto Sans", -apple-system, "Segoe UI", sans-serif;
  color: var(--ad-text);
  -webkit-tap-highlight-color: transparent;
  padding-bottom: 104px;
}

:where(.ad) *, :where(.ad) *::before, :where(.ad) *::after { box-sizing: border-box; margin: 0; padding: 0; }
:where(.ad) svg { display: block; max-width: none; }
:where(.ad) button { font: inherit; border: 0; background: none; color: inherit; cursor: pointer; }

.ad-stage { position: relative; width: 100%; aspect-ratio: 414 / 836; }

.ad-phone {
  position: absolute;
  left: 0; top: 0;
  width: 414px; height: 836px;
  transform-origin: 0 0;
  transform: scale(var(--s, 0.72));
  padding: 12px;
  border-radius: 64px;
  background: #313c52;
  box-shadow: inset 0 0 0 2px #4b587a, inset 0 0 0 4px #0c1220, 0 0 0 1px rgba(255, 255, 255, 0.07), 0 40px 60px -24px rgba(0, 0, 0, 0.65);
}
.ad-phone::before, .ad-phone::after { content: ""; position: absolute; width: 4px; border-radius: 2px; background: #252e41; }
.ad-phone::before { left: -3px; top: 150px; height: 56px; box-shadow: 0 74px 0 #252e41; }
.ad-phone::after { right: -3px; top: 190px; height: 92px; }

.ad-screen {
  position: relative;
  width: 390px; height: 812px;
  border-radius: 52px;
  overflow: hidden;
  background: var(--ad-bg);
  isolation: isolate;
}

/* чистий статус-бар замість записаного (без особистих даних) */
.ad-status {
  position: absolute; left: 0; right: 0; top: 0; height: 28px; z-index: 5;
  background: var(--ad-bg);
  display: flex; justify-content: space-between; align-items: center; padding: 2px 30px 0 34px;
  font-weight: 600; font-size: 13px; letter-spacing: 0.01em; pointer-events: none;
}
.ad-status .ad-sys { display: flex; gap: 6px; align-items: center; }
.ad-hole { position: absolute; top: 9px; left: 50%; width: 11px; height: 11px; margin-left: -5px; border-radius: 50%; background: #0c1220; z-index: 6; }

.ad-vid {
  position: absolute; left: 0; top: 28px; width: 390px; height: 784px;
  object-fit: cover; object-position: top; background: var(--ad-bg); display: block;
}

/* кнопка відтворення: видно, коли відео стоїть (reduced motion, заблокований автозапуск, пауза) */
.ad-play {
  position: absolute; left: 50%; top: 50%; z-index: 4;
  width: 88px; height: 88px; margin: -44px 0 0 -44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; padding-left: 5px;
  background: rgba(12, 18, 32, 0.62); color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  opacity: 0; visibility: hidden; transition: opacity 0.2s ease 0.15s, visibility 0s linear 0.35s;
}
.ad-play svg { width: 40px; height: 40px; }
.ad.is-paused .ad-play { opacity: 1; visibility: visible; transition: opacity 0.2s ease 0.15s, visibility 0s; }
.ad-play:focus-visible { outline: 3px solid var(--accent, #378add); outline-offset: 4px; }

/* ---------- підпис + крапки-розділи (сайт) ---------- */
.ad-cap { position: absolute; left: 0; right: 0; bottom: 0; height: 84px; text-align: center; }
.ad-cap-item { position: absolute; left: 0; right: 0; top: 0; opacity: 0; transform: translateY(6px); transition: opacity 0.35s ease, transform 0.35s ease; pointer-events: none; }
.ad-cap-item.is-on { opacity: 1; transform: none; }
.ad-cap-item b { display: block; font-family: var(--font-display, "Space Grotesk", sans-serif); font-weight: 600; font-size: 1.05rem; color: var(--text, #f0f0ec); letter-spacing: -0.005em; }
.ad-cap-item span { display: block; font-size: 0.85rem; color: var(--text-muted, #a8a79e); margin-top: 2px; }
.ad-dots { display: flex; justify-content: center; gap: 4px; position: absolute; left: 0; right: 0; bottom: 0; }
.ad-dot { flex: 1 1 0; max-width: 26px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.16); overflow: hidden; border: 0; padding: 0; cursor: pointer; }
.ad-dot i { display: block; height: 100%; width: 100%; background: var(--accent, #378add); transform-origin: 0 50%; transform: scaleX(0); }
.ad-dot:focus-visible { outline: 2px solid var(--accent, #378add); outline-offset: 3px; }

.ad.is-bare { padding-bottom: 0; }
.ad.is-bare .ad-cap { display: none; }

@media (max-width: 960px) {
  .ad { max-width: 260px; }
}
