/* assets/apps.css — the app pages: Zopi Phone (download.php), Remote Support (remote-support.php)
   and Zopi Guard (zopi-guard.php). Building blocks are in assets/ui.css; behaviour in assets/apps.js. */
.ap-hero{padding:3.4rem 0 3.4rem}
.ap-hgrid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(340px,.75fr);gap:3.5rem;align-items:center;position:relative;z-index:1}
.ap-h1{font-size:clamp(2.1rem,3.9vw,3.2rem)}
.ap-anchor{scroll-margin-top:125px}   /* lands below the menu and the jump bar */
@media(min-width:1100px){.ap-jtrack{justify-content:center;gap:.6rem}}   /* Zopi Guard has only a few chips, so centre them */

/* Download button, filled in by apps.js from the release API */
.ap-get{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;min-height:50px;margin-bottom:1.3rem}
.ap-dl{display:inline-flex;align-items:center;gap:.55rem;padding:.9rem 1.8rem;font-size:.95rem}
.ap-dl i{font-style:normal;font-size:1.05rem}
.ap-ver{color:var(--muted);font-size:.78rem}
.ap-skel{width:240px;height:48px;border-radius:9px;background:rgba(255,255,255,.06);animation:apPulse 1.4s ease-in-out infinite}
@keyframes apPulse{50%{opacity:.5}}
.ap-msg{color:var(--muted2);font-size:.85rem}
.ap-msg.ap-bad{color:var(--red)}
.ap-note{color:var(--muted);font-size:.76rem;line-height:1.6;margin:-.4rem 0 1.2rem;max-width:520px}
.ap-plats{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:1.2rem}
.ap-plat{padding:.3rem .75rem;border-radius:99px;font-size:.72rem;font-weight:600;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.1);color:var(--muted2)}
.ap-plat.ap-ok{background:rgba(74,222,128,.1);border-color:rgba(74,222,128,.28);color:var(--green)}

/* Zopi Phone: the app in a glowing frame */
.ap-device{position:relative;justify-self:center;width:min(330px,100%)}
.ap-hgrid>.ap-device{width:min(270px,100%)}   /* the tall phone screenshot in the Zopi Phone hero */
.ap-device::before{content:"";position:absolute;inset:8% -12%;background:radial-gradient(closest-side,rgba(0,194,255,.28),transparent);filter:blur(30px);z-index:-1}
.ap-shot{display:block;width:100%;height:auto;border-radius:16px;border:1px solid rgba(255,255,255,.1);box-shadow:0 30px 80px rgba(0,0,0,.5);background:#0d1b2a}

/* Showcase: a screenshot beside a list */
.ap-show{display:grid;grid-template-columns:320px 1fr;gap:4rem;align-items:center}
.ap-show .ap-device{width:100%}
/* Zopi Guard hero: the dashboard runs off the right edge of the page on wide screens */
.ap-gbleed{width:140%;max-width:none}
.ap-gbleed .ap-shot{border-radius:14px}
/* A full-width screenshot inside a section (the Guard map) */
.ap-wideshot{margin:2.2rem 0 0;max-width:1000px}
.ap-wideshot figcaption{color:var(--muted);font-size:.78rem;margin-top:.7rem}
/* Remote: the consent prompt beside "You stay in control" */
.ap-rshow{grid-template-columns:300px 1fr;margin-bottom:2.4rem}
.ap-show.ap-wide{grid-template-columns:minmax(0,1.25fr) minmax(0,.75fr);gap:3rem}
.ap-show.ap-wide.ap-flip{grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr)}   /* text first, screenshot on the right */   /* a landscape screenshot (Settings) */
.ap-list{list-style:none;margin:1.6rem 0 0;padding:0;display:flex;flex-direction:column;gap:.8rem}
.ap-list li{display:flex;gap:.9rem;align-items:flex-start;padding:1rem 1.1rem;border-radius:14px;background:var(--card-solid);border:1px solid var(--border);transition:border-color .25s}
.ap-list li:hover{border-color:rgba(0,194,255,.35)}
.ap-list .h-ci{margin:0;flex-shrink:0}
.ap-list b{display:block;font-family:"Syne",sans-serif;font-size:.95rem;margin-bottom:.2rem}
.ap-list small{display:block;color:var(--muted2);font-size:.83rem;line-height:1.6}

/* Feature cards */
.ap-feats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;margin-top:2.4rem}
.ap-feat{display:flex;flex-direction:column;background:var(--card-solid);border:1px solid var(--border);border-radius:14px;padding:1.4rem;transition:border-color .25s}
.ap-feat:hover{border-color:rgba(0,194,255,.35)}
.ap-feat h3{font-family:"Syne",sans-serif;font-size:.98rem;margin-bottom:.4rem}
.ap-feat p{color:var(--muted2);font-size:.83rem;line-height:1.65;flex:1}

/* Zopi Phone: the real app, running in the page on a pretend line (demo/zopi-phone/, tools/phone-demo/build.py).
   The frame follows the app window's size (300px dialpad, 940px wide screens) and scales down to fit. */
.ap-try{text-align:center;overflow:hidden}
.ap-try .h-lead{margin:0 auto}
.ap-tbtns{display:flex;justify-content:center;gap:.5rem;flex-wrap:wrap;margin:1.6rem 0 0}
.ap-tbtn{display:inline-flex;align-items:center;gap:.45rem;font:inherit;font-size:.82rem;font-weight:600;padding:.6rem 1rem;border-radius:9px;border:1px solid rgba(0,194,255,.35);background:rgba(0,194,255,.08);color:#fff;cursor:pointer;transition:border-color .2s,background .2s,opacity .2s}
.ap-tbtn:hover:not(:disabled){border-color:rgba(0,194,255,.7);background:rgba(0,194,255,.15)}
.ap-tbtn:disabled{opacity:.4;cursor:default}
.ap-tbtn.ap-plain{border-color:rgba(255,255,255,.15);background:none;color:var(--muted2)}
.ap-stage{position:relative;margin:2rem auto 0;width:300px;height:740px;transition:width .22s cubic-bezier(.4,0,.2,1),height .22s}
.ap-stage::before{content:"";position:absolute;inset:6% -8%;background:radial-gradient(closest-side,rgba(0,194,255,.22),transparent);filter:blur(30px);z-index:-1}
.ap-frame{position:absolute;left:0;top:0;width:300px;height:740px;border:0;border-radius:12px;box-shadow:0 30px 80px rgba(0,0,0,.5);transform-origin:0 0;background:transparent}
.ap-pop{position:absolute;left:0;top:0;width:300px;height:420px;border:0;border-radius:12px;background:transparent;z-index:2;transform-origin:0 0;box-shadow:0 30px 80px rgba(0,0,0,.55),0 0 40px rgba(0,194,255,.18);opacity:0;translate:0 14px;pointer-events:none;visibility:hidden;transition:opacity .25s ease,translate .3s cubic-bezier(.2,.7,.2,1),visibility 0s .3s}
.ap-pop.on{opacity:1;translate:0 0;pointer-events:auto;visibility:visible;transition:opacity .25s ease,translate .3s cubic-bezier(.2,.7,.2,1),visibility 0s}
/* Zopi Phone: feature tips over the demo (assets/phone-tips.js) */
.ap-tips{position:absolute;inset:0;z-index:3;pointer-events:none}
.ap-dot{position:absolute;width:16px;height:16px;margin:-8px 0 0 -8px;padding:0;border-radius:50%;border:2px solid #fff;background:var(--cyan);cursor:help;pointer-events:auto;box-shadow:0 0 0 0 rgba(0,194,255,.6),0 2px 8px rgba(0,0,0,.5);animation:apPulse 2.2s ease-out infinite;transition:transform .15s}
.ap-dot:hover,.ap-dot:focus-visible,.ap-dot.on{transform:scale(1.3);animation:none;box-shadow:0 0 0 4px rgba(0,194,255,.35),0 2px 8px rgba(0,0,0,.5);outline:none}
.ap-dot[hidden]{display:none}
.ap-small .ap-dot{width:12px;height:12px;margin:-6px 0 0 -6px;border-width:1.5px}   /* the app shrunk to fit a phone */
.ap-still .ap-dot{animation:none}
@keyframes apPulse{0%{box-shadow:0 0 0 0 rgba(0,194,255,.6),0 2px 8px rgba(0,0,0,.5)}70%{box-shadow:0 0 0 12px rgba(0,194,255,0),0 2px 8px rgba(0,0,0,.5)}100%{box-shadow:0 0 0 0 rgba(0,194,255,0),0 2px 8px rgba(0,0,0,.5)}}
.ap-tip{position:absolute;z-index:4;width:250px;text-align:left;padding:.8rem .95rem;border-radius:12px;background:#152033;border:1px solid rgba(0,194,255,.4);box-shadow:0 18px 40px rgba(0,0,0,.5);pointer-events:none;animation:apTipIn .15s ease-out}
.ap-tip b{display:block;font-family:"Syne",sans-serif;font-size:.9rem;color:#fff;margin-bottom:.25rem}
.ap-tip span{display:block;font-size:.8rem;line-height:1.55;color:var(--muted2)}
.ap-tip[hidden]{display:none}
.ap-tip.ap-tip-wide{width:310px}
@keyframes apTipIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
.ap-tbtn[aria-pressed="false"]{opacity:.6}

/* Zopi Guard: the real app window (1200×720), scaled down to fit */
.ap-gstage{position:relative;margin:2rem auto 0;width:1200px;height:720px;max-width:none}
.ap-gstage::before{content:"";position:absolute;inset:4% -4%;background:radial-gradient(closest-side,rgba(0,194,255,.18),transparent);filter:blur(40px);z-index:-1}
.ap-gframe{position:absolute;left:0;top:0;width:1200px;height:720px;border:1px solid rgba(255,255,255,.1);border-radius:12px;transform-origin:0 0;box-shadow:0 30px 80px rgba(0,0,0,.5);background:#0d1b2a}
.ap-rstage,.ap-rstage .ap-gframe{width:460px;height:780px}   /* Zopi Remote's window */
.ap-tnote{color:var(--muted);font-size:.74rem;margin-top:1.2rem}
.ap-tsmall{display:none}
@media(max-width:700px){.ap-tsmall{display:inline}}

/* The Remote and Guard hero screenshots */
.ap-rwrap{position:relative}
.ap-gwrap{position:relative}

/* Zopi Guard: licensing */
.ap-lgrid{display:grid;grid-template-columns:.85fr 1.15fr;gap:1.5rem;margin-top:2.4rem;align-items:stretch}
.ap-price{border-radius:18px;padding:1.6rem;background:linear-gradient(160deg,rgba(0,194,255,.12),rgba(123,47,190,.14)),var(--card-solid);border:1px solid rgba(0,194,255,.3);display:flex;flex-direction:column}
.ap-price>small{color:var(--muted2);font-size:.72rem;text-transform:uppercase;letter-spacing:.12em}
.ap-price .h-amt{margin:.4rem 0 .3rem}
.ap-price ul{list-style:none;margin:1rem 0 1.4rem;padding:0;display:flex;flex-direction:column;gap:.5rem;flex:1}
.ap-price li{font-size:.84rem;color:var(--muted2)}
.ap-price li::before{content:"✓";color:var(--green);margin-right:.55rem;font-weight:700}
.ap-price li b{color:#fff;font-weight:600}
.ap-price .h-btns{flex-direction:column;align-items:stretch;text-align:center;margin:0}
.ap-free{display:inline-block;align-self:flex-start;font-size:.7rem;font-weight:700;padding:.25rem .65rem;border-radius:99px;background:rgba(74,222,128,.12);color:var(--green);margin-bottom:.4rem}
.ap-lsteps{display:flex;flex-direction:column;gap:.8rem;counter-reset:ls}
.ap-lstep{display:flex;gap:1rem;align-items:flex-start;padding:1.15rem 1.2rem;border-radius:14px;background:var(--card-solid);border:1px solid var(--border)}
.ap-lstep::before{counter-increment:ls;content:counter(ls);flex-shrink:0;width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-family:"Syne",sans-serif;font-weight:800;color:var(--cyan);background:rgba(0,194,255,.08);border:1px solid rgba(0,194,255,.25)}
.ap-lstep h3{font-family:"Syne",sans-serif;font-size:.95rem;margin-bottom:.25rem}
.ap-lstep p{color:var(--muted2);font-size:.83rem;line-height:1.6}

/* Zopi Guard: requirements */
.ap-req{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin-top:2.4rem}
.ap-reqi{display:flex;gap:.9rem;align-items:flex-start;padding:1.2rem 1.3rem;border-radius:14px;background:var(--card-solid);border:1px solid var(--border)}
.ap-reqi .h-ci{margin:0;flex-shrink:0}
.ap-reqi h3{font-family:"Syne",sans-serif;font-size:.95rem;margin-bottom:.3rem}
.ap-reqi p{color:var(--muted2);font-size:.83rem;line-height:1.6}

/* Release notes (apps.js for Phone and Remote; written by PHP for Guard) */
.ap-log{max-width:760px;margin-top:2.2rem;display:flex;flex-direction:column;gap:.7rem}
.ap-rel{border-radius:14px;background:var(--card-solid);border:1px solid var(--border);transition:border-color .25s}
.ap-rel[open]{border-color:rgba(0,194,255,.3)}
.ap-rel summary{display:flex;align-items:center;gap:.7rem;flex-wrap:wrap;padding:1rem 1.2rem;cursor:pointer;list-style:none}
.ap-rel summary::-webkit-details-marker{display:none}
.ap-rel summary::after{content:"+";margin-left:.4rem;color:var(--cyan);font-size:1.1rem;line-height:1;transition:transform .2s}
.ap-rel[open] summary::after{transform:rotate(45deg)}
.ap-rv{font-family:"Syne",sans-serif;font-weight:700;font-size:1rem}
.ap-latest{font-size:.62rem;font-weight:700;letter-spacing:.08em;padding:.2rem .5rem;border-radius:99px;background:rgba(0,194,255,.14);color:var(--cyan)}
.ap-rdate{margin-left:auto;color:var(--muted);font-size:.76rem}
.ap-rnotes{padding:0 1.2rem 1.2rem;color:var(--muted2);font-size:.84rem;line-height:1.75;white-space:pre-wrap}
.ap-rnone{font-style:italic;color:var(--muted)}
.ap-md{white-space:normal}
.ap-md p{margin:0 0 .7rem}
.ap-md h4{margin:1rem 0 .4rem;color:var(--text);font-size:.88rem;font-weight:700}
.ap-md h4:first-child{margin-top:0}
.ap-md ul{margin:0 0 .7rem;padding-left:1.1rem}
.ap-md li{margin:.2rem 0}
.ap-md strong{color:var(--text)}
.ap-md code{font-size:.78rem;background:rgba(255,255,255,.06);border-radius:4px;padding:.05rem .3rem;word-break:break-all}
.ap-md>:last-child{margin-bottom:0}
.ap-more{margin-top:.4rem;align-self:flex-start;background:none;border:1px solid rgba(255,255,255,.15);color:var(--muted2);font:inherit;font-size:.8rem;padding:.55rem 1rem;border-radius:9px;cursor:pointer;transition:border-color .2s,color .2s}
.ap-more:hover{border-color:rgba(0,194,255,.5);color:#fff}

/* Zopi Guard: deployment guide (includes/content/zopi-guard-guide.md) */
.zg-guide-wrap{display:grid;grid-template-columns:220px 1fr;gap:2.6rem;align-items:start;margin-top:2.4rem}
.zg-guide-wrap.zg-notoc{grid-template-columns:1fr;max-width:780px}
.zg-toc{position:sticky;top:130px;display:flex;flex-direction:column;gap:.15rem;border-left:1px solid var(--border);padding-left:1rem}
.zg-toc-h{color:var(--cyan);font-size:.63rem;letter-spacing:.16em;text-transform:uppercase;font-weight:600;margin-bottom:.5rem}
.zg-toc a{color:var(--muted)!important;font-size:.8rem;padding:.3rem 0;line-height:1.4;transition:color .2s}
.zg-toc a:hover{color:#fff!important}
.zg-guide{min-width:0;max-width:780px;color:var(--muted2);font-size:.92rem;line-height:1.8;border-radius:18px;padding:2rem 2.2rem;background:var(--card-solid);border:1px solid var(--border)}
.zg-guide h2{font-family:"Syne",sans-serif;font-size:1.2rem;font-weight:700;color:#fff;margin:2.2rem 0 .7rem;scroll-margin-top:130px}
.zg-guide h2:first-child{margin-top:0}
.zg-guide h3{font-family:"Syne",sans-serif;font-size:.98rem;font-weight:700;color:#fff;margin:1.4rem 0 .5rem}
.zg-guide p{margin-bottom:1rem}
.zg-guide ul,.zg-guide ol{margin:0 0 1rem 1.3rem}
.zg-guide li{margin-bottom:.45rem;padding-left:.2rem}
.zg-guide ol li::marker{color:var(--cyan);font-weight:700}
.zg-guide strong{color:#fff}
.zg-guide a{color:var(--cyan)!important}
.zg-guide code{font-family:Consolas,"Courier New",monospace;font-size:.82em;background:rgba(0,194,255,.08);border:1px solid rgba(0,194,255,.14);border-radius:4px;padding:.08rem .35rem;color:#cfeefa;word-break:break-word}
.zg-guide pre{background:#0b1522;border:1px solid var(--border);border-radius:10px;padding:1rem 1.1rem;margin:0 0 1.1rem;overflow-x:auto}
.zg-guide pre code{background:none;border:0;padding:0;font-size:.82rem;color:#cfeefa;word-break:normal;white-space:pre}
.zg-note{background:rgba(0,194,255,.05);border:1px solid rgba(0,194,255,.16);border-left:3px solid var(--cyan);border-radius:8px;padding:.85rem 1rem;margin:0 0 1.1rem;font-size:.86rem}

@media(max-width:980px){
  .ap-hgrid{grid-template-columns:1fr;gap:2.6rem}
  .ap-show{grid-template-columns:1fr;gap:2.4rem}
  .ap-show .ap-device{width:min(300px,100%)}
  .ap-show.ap-wide{grid-template-columns:1fr}
  .ap-gbleed{width:100%}
  .ap-rshow{grid-template-columns:1fr}
  .ap-rshow .ap-device{width:min(280px,100%)}
  .ap-show.ap-wide .ap-device{width:min(640px,100%)}
  .ap-show.ap-wide .ap-device::before{inset:8% 0}   /* keep the glow inside the screen */
  .ap-feats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ap-lgrid{grid-template-columns:1fr}
  .ap-rwrap,.ap-gwrap{max-width:560px}
  .zg-guide-wrap{grid-template-columns:1fr;gap:1.4rem}
  .zg-toc{position:static;border-left:0;padding-left:0;flex-direction:row;flex-wrap:wrap;gap:.4rem}
  .zg-toc-h{width:100%;margin-bottom:.2rem}
  .zg-toc a{border:1px solid var(--border);border-radius:99px;padding:.3rem .75rem;font-size:.74rem}
}
@media(max-width:700px){
  .ap-req{grid-template-columns:1fr}
}
@media(max-width:560px){
  .ap-hero{padding:2.2rem 0 2.6rem}
  .ap-feats{grid-template-columns:1fr}
  .ap-get{flex-direction:column;align-items:stretch;text-align:center}
  .ap-dl{justify-content:center}
  .zg-guide{padding:1.3rem 1.1rem;font-size:.88rem}
  .ap-rel summary{padding:.9rem 1rem}
  .ap-rnotes{padding:0 1rem 1rem}
}
@media(prefers-reduced-motion:reduce){
  .ap-skel{animation:none}
}
