/* Demo page: a MacBook that opens as you scroll, with the product's demo app on its screen.
   Generated per product by _template/build_pages.py (accent colours are filled in there). */
:root {
  --accent: #F43F5E; --accent-rgb: 244, 63, 94; --on-accent: #0b0d12;
  --bg: #07080b; --ink: #eef0f4; --muted: #8b91a0; --line: rgba(255, 255, 255, .09);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
html.locked { overscroll-behavior: none; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- top bar ---------- */
.top { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center;
  padding: 22px clamp(16px, 4vw, 44px); font-size: 14px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: .14em; }
.demo-badge { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--on-accent);
  background: var(--accent); border-radius: 999px; padding: 5px 10px; }
.top a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.top a:hover { color: var(--ink); }

/* ---------- intro ---------- */
.intro { min-height: 86vh; display: grid; place-items: center; text-align: center; padding: 120px 16px 24px; }
.kicker { margin: 0; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.intro h1 { margin: 16px 0 14px; font-size: clamp(38px, 7vw, 88px); line-height: 1; letter-spacing: -.035em; font-weight: 700; }
.intro h1 b { color: var(--accent); font-weight: 700; }
.lede { max-width: 600px; margin: 0 auto; color: var(--muted); font-size: clamp(16px, 2vw, 19px); line-height: 1.5; }
.demo-note { max-width: 600px; margin: 22px auto 0; padding: 14px 18px; border: 1px solid rgba(var(--accent-rgb), .45); border-radius: 14px;
  background: rgba(var(--accent-rgb), .08); color: var(--ink); font-size: 15px; line-height: 1.5; }
.demo-note strong { display: block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.cta { margin-top: 28px; border: 0; border-radius: 999px; padding: 15px 28px; font-weight: 600; font-size: 16px;
  background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 34px rgba(var(--accent-rgb), .4); }
.cue { margin-top: 26px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.cue i { width: 22px; height: 34px; border: 2px solid rgba(255, 255, 255, .25); border-radius: 12px; position: relative; }
.cue i::after { content: ""; position: absolute; left: 50%; top: 6px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px;
  background: var(--ink); animation: wheel 1.6s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(-2px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }

/* ---------- scroll stage ---------- */
.stage { height: 320vh; position: relative; }
.sticky { position: sticky; top: 0; height: 100vh; display: grid; place-items: center; overflow: hidden; padding: 0 8px 72px; }
.glow { position: absolute; inset: auto 0 0 0; height: 72vh; pointer-events: none; opacity: var(--glow, 0);
  background: radial-gradient(50% 60% at 50% 72%, rgba(var(--accent-rgb), .3), transparent 70%); }

.mac { position: relative; width: min(1640px, 100%, calc((100vh - 96px) * 1.6)); container-type: inline-size;
  transform: translateY(calc((1 - var(--p, 0)) * 6vh)) scale(calc(.94 + var(--p, 0) * .06)); }
.mac::after { content: ""; position: absolute; left: 4%; right: 4%; bottom: -3.5cqw; height: 5cqw; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .8), transparent); filter: blur(6px); }
.hinge { perspective: 2600px; perspective-origin: 50% 120%; }
.lid { position: relative; margin: 0 6.2%; padding: 1.25cqw 1.25cqw 1.9cqw; border-radius: 2.6cqw 2.6cqw .8cqw .8cqw; background: #050506;
  box-shadow: inset 0 0 0 .18cqw #2c2e33, inset 0 0 0 .35cqw #0b0b0d, 0 0 0 .12cqw #54575e, 0 40px 90px rgba(0, 0, 0, .55);
  transform-origin: 50% 100%; transform: rotateX(var(--lid, -88deg)); will-change: transform; }
.lid::before { content: ""; position: absolute; top: 1.2cqw; left: 50%; width: 10%; height: 2.3cqw; transform: translateX(-50%); z-index: 4;
  border-radius: 0 0 .9cqw .9cqw; background: #050506; }
.lid::after { content: ""; position: absolute; top: 1.95cqw; left: 50%; width: .7cqw; height: .7cqw; margin-left: -.35cqw; z-index: 5; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2a3b52, #0a0f16 60%); }
.screen { position: relative; display: flex; flex-direction: column; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 1.3cqw 1.3cqw 0 0; background: #000; }
.base { position: relative; height: 2.3cqw; border-radius: .3cqw .3cqw 2cqw 2cqw / .3cqw .3cqw 1.8cqw 1.8cqw;
  background: linear-gradient(180deg, #d9dce1 0%, #c3c7cd 22%, #a9aeb6 55%, #7d828a 82%, #50545b 100%);
  box-shadow: inset 0 .12cqw 0 rgba(255, 255, 255, .8), inset 0 -.2cqw .3cqw rgba(0, 0, 0, .35); }
.base::before { content: ""; position: absolute; left: 6.2%; right: 6.2%; top: -.55cqw; height: .55cqw; border-radius: .3cqw .3cqw 0 0;
  background: linear-gradient(#2a2c30, #6b6f76); }
.base i { position: absolute; left: 50%; top: 0; width: 15%; height: 45%; transform: translateX(-50%); border-radius: 0 0 1cqw 1cqw;
  background: linear-gradient(180deg, #8d9199, #b7bbc2); box-shadow: inset 0 .1cqw .2cqw rgba(0, 0, 0, .35); }

/* macOS menu bar */
.menubar { flex: none; display: flex; justify-content: space-between; align-items: center; height: 2.4cqw; padding: 0 1.6cqw 0 1.4cqw;
  background: #0b0c0e; color: #e6e8eb; font: 600 1.05cqw/1 var(--sans); }
.menubar .l, .menubar .r { display: flex; align-items: center; gap: 1.5cqw; }
.menubar .l span:not(:first-child):not(:nth-child(2)) { font-weight: 400; opacity: .85; }
.menubar .tag { font-weight: 700; font-size: .85cqw; letter-spacing: .08em; color: var(--on-accent); background: var(--accent); border-radius: 999px; padding: .32cqw .75cqw; }
.menubar svg { height: 1.15cqw; width: auto; fill: currentColor; }
.statusbar { display: none; }

/* the screen: a poster from the first frame, then the app */
.viewport { position: relative; flex: 1; overflow: hidden; background: #0a0b0f; }
.poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: opacity .5s; }
.viewport iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; opacity: 0; pointer-events: none; transition: opacity .5s; background: #0a0b0f; }
.viewport.live iframe { opacity: 1; }
.viewport.live .poster { opacity: 0; }
html.locked .viewport.live iframe { pointer-events: auto; }

/* controls under the device */
.controls { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 8px 12px; padding: 0 12px; opacity: var(--ctl, 0); visibility: hidden; }
.controls.on { visibility: visible; }
.controls button { font-weight: 600; font-size: 14px; line-height: 1; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px; padding: 11px 18px; display: inline-flex; align-items: center; gap: 8px; }
.controls button:hover { background: rgba(255, 255, 255, .13); }
.controls button.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); box-shadow: 0 8px 24px rgba(var(--accent-rgb), .4); }
.controls button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.controls .note { width: 100%; text-align: center; color: var(--muted); font-size: 12.5px; }
.controls .note b { color: var(--ink); font-weight: 600; }
.controls .note a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
#unlock { display: none; }
html.locked #unlock { display: inline-flex; }
.close { display: none; }

/* ---------- iPhone ---------- */
body.phone .mac { width: min(400px, 88vw, calc((100vh - 130px) * .47)); }
body.phone .mac::after, body.phone .base, body.phone .menubar, body.phone .lid::after { display: none; }
body.phone .lid { margin: 0; padding: 3.2cqw; border-radius: 15cqw;
  box-shadow: inset 0 0 0 .6cqw #2c2e33, 0 0 0 .5cqw #4a4d54, 0 40px 90px rgba(0, 0, 0, .6); }
body.phone .lid::before { top: 5.6cqw; width: 30%; height: 8.4cqw; border-radius: 6cqw; background: #000; }
body.phone .screen { aspect-ratio: 390 / 844; border-radius: 12cqw; }
body.phone .statusbar { flex: none; display: flex; justify-content: space-between; align-items: center; height: 13cqw;
  padding: 1.5cqw 8cqw 0 10cqw; background: #0a0b0f; color: #fff; font: 600 4.3cqw/1 var(--sans); }
body.phone .statusbar .r { display: flex; align-items: center; gap: 1.6cqw; }
body.phone .statusbar svg { height: 3.4cqw; width: auto; fill: currentColor; }

/* ---------- full screen ---------- */
body.expanded .mac { position: fixed; inset: 0; width: auto; transform: none; z-index: 60; }
body.expanded .mac::after, body.expanded .base, body.expanded .menubar, body.expanded .statusbar, body.expanded .lid::before, body.expanded .lid::after { display: none; }
body.expanded .hinge { perspective: none; height: 100%; }
body.expanded .lid { transform: none; margin: 0; padding: 0; height: 100%; border-radius: 0; box-shadow: none; }
body.expanded .screen { aspect-ratio: auto; height: 100%; border-radius: 0; }
body.expanded .controls { display: none; }
body.expanded .close { display: inline-flex; position: fixed; z-index: 70; left: 50%; bottom: 14px; transform: translateX(-50%); align-items: center; gap: 8px;
  font-weight: 600; font-size: 13px; padding: 10px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(12, 13, 17, .86); color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }

/* ---------- contact (bottom corner, opens Telegram) ---------- */
.contact { position: fixed; right: 18px; bottom: 18px; z-index: 40; display: inline-flex; align-items: center; gap: 10px; padding: 9px 18px 9px 9px;
  border-radius: 999px; background: #fff; color: #0b0d12; font-weight: 600; font-size: 14.5px; line-height: 1; text-decoration: none;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .12); transition: transform .15s; }
.contact:hover { transform: translateY(-2px); }
.contact svg { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: #2aabee; fill: #fff; }
body.expanded .contact { display: none; }
@media (max-width: 880px) { .contact { padding: 7px; } .contact span { display: none; } }

/* ---------- after ---------- */
.after { max-width: 1020px; margin: 0 auto; padding: 48px 16px 40px; display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
.after div { border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: rgba(255, 255, 255, .02); }
.after h2 { margin: 0 0 6px; font-size: 16px; }
.after p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.foot { max-width: 1020px; margin: 0 auto; padding: 0 16px 96px; color: var(--muted); font-size: 13px; line-height: 1.6; text-align: center; }
.foot b { color: var(--ink); }
.foot a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }

@media (max-width: 720px) {
  .after { grid-template-columns: 1fr; }
  .stage { height: 240vh; }
  .top { padding: 16px; }
  .intro { padding-top: 96px; }
  .controls button { font-size: 13px; padding: 10px 14px; }
  /* a real phone: leave room for the controls under the iPhone, and no MacBook switch (it would be unreadably small) */
  .sticky { padding-bottom: 108px; }
  body.phone .mac { width: min(400px, 88vw, calc((100vh - 124px) * .45)); }
  #device { display: none; }
  /* the contact button sits beside the two controls, so keep that corner free */
  .contact { right: 10px; bottom: 50px; }
  .controls { padding-right: 62px; }
}
@media (prefers-reduced-motion: reduce) { .cue i::after { animation: none; } .poster, .viewport iframe { transition: none; } }
