/* Click-through demo, v2: full-viewport stage, camera zooms to the hotspot */
html, body.demo-body { height: 100%; }
.demo-body { background: #0B1E2B; color: #fff; overflow: hidden; }

.demo-top { height: 56px; display: flex; align-items: center; gap: 14px; padding: 0 20px; background: #fff; color: var(--sea-900); border-bottom: 1px solid var(--border); }
.demo-top .logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--sea-900); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.demo-top .logo img.logo__img { height: 28px; }
@media (max-width: 420px) { .demo-top .logo img.logo__img { height: 26px; } }
.demo-badge { font-size: 13px; font-weight: 600; color: var(--turq-700); background: var(--turq-100); padding: 5px 10px; border-radius: 999px; }
.demo-top__right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.demo-back { color: var(--text-muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.demo-back:hover { color: var(--sea-900); }

.demo { height: calc(100vh - 56px); height: calc(100svh - 56px); display: flex; flex-direction: column; }
.demo__mtitle { display: none; }

.stage { position: relative; flex: 1; min-height: 0; overflow: hidden; background: radial-gradient(120% 90% at 50% 0%, #12344A 0%, #0B1E2B 70%); outline: none; }
.layer { position: absolute; left: 0; top: 0; transform-origin: 0 0; transition: transform .7s var(--ease); will-change: transform; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55); }
.layer img { display: block; width: 100%; height: 100%; transition: opacity .35s var(--ease); }
.layer img.is-loading { opacity: .4; }

.hotspot {
  position: absolute; border: 0; padding: 0; cursor: pointer; background: transparent;
  border-radius: 10px; box-shadow: 0 0 0 2.5px var(--turq-500), 0 0 0 9999px rgba(4, 42, 66, .22);
}
.hotspot::before, .hotspot::after {
  content: ""; position: absolute; inset: -2px; border-radius: 12px; border: 2.5px solid var(--turq-500);
  animation: pulse 1.8s var(--ease) infinite; pointer-events: none;
}
.hotspot::after { animation-delay: .9s; }
.hotspot:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.hotspot[hidden] { display: none; }
@keyframes pulse { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.35); } }

.tip {
  position: absolute; z-index: 3; width: min(380px, calc(100% - 24px)); line-height: 1.5;
  background: #fff; color: var(--sea-900); border-radius: 16px; padding: 18px 20px 16px;
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .6), 0 0 0 1px rgba(4, 42, 66, .06);
  font-size: 16px; transition: left .6s var(--ease), top .6s var(--ease), opacity .3s;
}
.tip::before { content: ""; position: absolute; left: var(--ax, 50%); width: 14px; height: 14px; background: #fff; transform: translateX(-50%) rotate(45deg); border-radius: 3px; }
.tip.is-below::before { top: -6px; }
.tip.is-above::before { bottom: -6px; }
.tip.is-free::before { display: none; }
.tip__title { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; margin-bottom: 4px; }
.tip p:not(.tip__title) { color: #3C5566; }
.tip__hint { display: block; margin-top: 10px; font-size: 14px; color: var(--turq-700); font-weight: 600; }
.tip.is-nudge { animation: nudge .45s var(--ease); }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.finale { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 20px; background: rgba(4, 22, 34, .6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); line-height: 1.5; }
.finale[hidden] { display: none; }
.finale__card { background: #fff; color: var(--sea-900); border-radius: 22px; padding: 38px 36px; max-width: 470px; text-align: center; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6); }
.finale__card .ico { width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 18px; }
.finale__card .ico svg { width: 28px; height: 28px; }
.finale__card h2 { font-size: 30px; letter-spacing: -0.02em; }
.finale__card p { color: var(--text-muted); margin-top: 10px; }
.finale__cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }

.demo__nav { flex: none; height: 68px; display: flex; align-items: center; gap: 16px; padding: 0 20px; background: #fff; color: var(--sea-900); border-top: 1px solid var(--border); }
.demo__step { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.demo__count { font-size: 14px; font-weight: 600; color: var(--turq-700); font-variant-numeric: tabular-nums; white-space: nowrap; }
.demo__title { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.navbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; justify-content: center; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: #fff; color: var(--sea-900); font: 600 15px/1 var(--font); cursor: pointer; transition: background .2s, border-color .2s, opacity .2s; flex: none; }
.navbtn svg { width: 18px; height: 18px; }
.navbtn:hover { border-color: var(--sea-600); }
.navbtn:disabled { opacity: .35; cursor: default; }
.navbtn--next { padding: 0 18px 0 22px; background: var(--turq-700); border-color: var(--turq-700); color: #fff; }
.navbtn--next:hover { background: #0A7A78; border-color: #0A7A78; }
.dots { list-style: none; display: flex; gap: 7px; padding: 0; margin: 0 auto; flex-wrap: nowrap; justify-content: center; }
.dots button { width: 9px; height: 9px; padding: 0; border-radius: 999px; border: 0; background: var(--border-strong); cursor: pointer; transition: width .3s var(--ease), background .3s; }
.dots button[aria-current="step"] { width: 26px; background: var(--turq-700); }
.dots button.is-done { background: var(--turq-300); }
.demo__tools { display: flex; gap: 4px; flex: none; }
.toolbtn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--text-muted); font: 500 14px/1 var(--font); cursor: pointer; padding: 8px 10px; border-radius: 10px; }
.toolbtn svg { width: 18px; height: 18px; }
.toolbtn:hover { color: var(--sea-900); background: var(--bg-soft); }
.toolbtn[aria-pressed="false"] #zoom-plus { display: inline; }
.toolbtn[aria-pressed="true"] #zoom-plus { display: none; }
.toolbtn[hidden] { display: none; }

@media (max-width: 1100px) { .demo__tools span { display: none; } }

/* ---------- phone: 390 screenshots at full width, camera pans vertically ---------- */
@media (max-width: 700px) {
  .demo-top { height: 52px; padding: 0 14px; }
  .demo-badge, .demo-back { display: none; }
  .demo-top .btn--sm { min-height: 34px; padding: 0 14px; font-size: 14px; }
  .demo { height: calc(100vh - 52px); height: calc(100svh - 52px); }
  .demo__mtitle { display: block; flex: none; padding: 9px 16px; background: #fff; color: var(--sea-900); font-weight: 700; font-size: 16px; border-bottom: 1px solid var(--border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .demo__mtitle .demo__count { margin-right: 8px; }
  .stage { background: #F3F8FA; }
  .layer { box-shadow: none; }
  .tip { font-size: 14.5px; padding: 13px 15px 12px; border-radius: 14px; width: calc(100% - 24px); }
  .tip__title { font-size: 15.5px; }
  .tip__hint { margin-top: 6px; font-size: 13px; }
  .demo__nav { height: auto; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); gap: 8px; }
  .demo__step, #fs, #zoom { display: none; }
  .demo__tools span { display: none; }
  .dots { gap: 5px; }
  .dots button { width: 7px; height: 7px; }
  .dots button[aria-current="step"] { width: 18px; }
  .navbtn--next span { display: none; }
  .navbtn--next { padding: 0 14px; }
  .finale__card { padding: 28px 22px; }
  .finale__card h2 { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .hotspot::before, .hotspot::after { animation: none; opacity: .6; }
  .layer, .tip, .layer img { transition: none; }
  .tip.is-nudge { animation: none; }
}
.tip__hint[hidden] { display: none; }
