/* App concepts (src/pages/apps/concepts/<id>/): the shell every prototype shares. Each prototype carries only its own
   look in an inline <style>; behaviour is in public/js/app-shell.js and the markup around the app in src/partials/app-*.html.

   1. Stage     .app-stage, .app-about: the page around the phone (our words about the concept)
   2. Phone     .app-phone, .app, .app-status: the drawn phone on wide screens; the whole screen on a real phone
   3. Screens   .app-body, .scr: one screen shows at a time ([data-pager]: screens sit side by side and swipe)
   4. Layers    .sheet, .app-scrim, .app-toast: sheets, drawers and the short messages
   5. Helpers   .ic (icons from /media/app-icons.svg) and resets inside .app, written with :where() so that any
                class in a prototype's own styles wins over them */

/* ---------- 1. Stage ---------- */
html,body{height:100%}
.app-page{margin:0;display:flex;flex-direction:column;overflow:hidden;background:#111}
.app-stage{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,25rem) auto;grid-template-rows:minmax(0,1fr);justify-content:center;align-items:center;gap:clamp(2rem,7vw,7rem);padding:clamp(.75rem,3vh,2.25rem) 2rem;background:var(--stage,#e9e6df);color:var(--stage-ink,#151413);font-family:Geist,system-ui,sans-serif}
.app-about{display:grid;gap:1rem;align-content:center}
.app-about__label{margin:0;font:500 .74rem/1.3 "Geist Mono",ui-monospace,monospace;letter-spacing:.1em;text-transform:uppercase;opacity:.72}
.app-about__name{margin:0;font-size:clamp(2.2rem,4vw,3.4rem);line-height:1;letter-spacing:-.035em;font-weight:600}
.app-about__line{margin:0;font-size:1.08rem;line-height:1.5;max-width:26rem}
.app-about__points{list-style:none;margin:.25rem 0 0;padding:0;border-top:1px solid color-mix(in srgb,currentColor 22%,transparent)}
.app-about__points li{padding:.7rem 0;border-bottom:1px solid color-mix(in srgb,currentColor 22%,transparent);font-size:.95rem;line-height:1.45}
.app-about__go{display:flex;flex-wrap:wrap;align-items:center;gap:.6rem 1.3rem;margin:.4rem 0 0}
.app-about__go a{color:inherit;font-weight:600;text-underline-offset:3px}
.app-about__go .app-about__cta{padding:.8rem 1.3rem;border-radius:99px;background:var(--stage-ink,#151413);color:var(--stage,#fff);text-decoration:none}
.app-about__note{margin:0;font-size:.8rem;line-height:1.5;opacity:.72;max-width:24rem}

/* ---------- 2. Phone ---------- */
.app-phone{box-sizing:border-box;width:412px;max-width:100%;height:min(866px,100%);padding:11px;border-radius:58px;background:#0b0b0c;box-shadow:inset 0 0 0 2px #2c2c30,0 0 0 1px rgba(255,255,255,.1),0 44px 80px -34px rgba(0,0,0,.6)}
.app{position:relative;isolation:isolate;display:flex;flex-direction:column;height:100%;overflow:hidden;border-radius:47px;background:#fff;color:#111;font:400 15px/1.4 Geist,system-ui,sans-serif;-webkit-font-smoothing:antialiased}
.app-status{position:relative;z-index:6;flex:none;display:flex;align-items:center;justify-content:space-between;height:48px;padding:12px 30px 0 34px;font:600 15px/1 Geist,system-ui,sans-serif;letter-spacing:-.01em}
.app-status__island{position:absolute;left:50%;top:11px;width:112px;height:31px;margin-left:-56px;border-radius:99px;background:#0b0b0c}
.app-status__icons{display:flex;align-items:center;gap:6px}

/* ---------- 3. Screens ---------- */
.app-body{position:relative;flex:1;min-height:0}
.scr{position:absolute;inset:0;overflow:hidden auto;overscroll-behavior:contain;scrollbar-width:none;visibility:hidden}
.scr::-webkit-scrollbar{display:none}
.scr.is-on{visibility:visible;animation:scr-in .34s cubic-bezier(.2,.8,.2,1)}
.scr:focus{outline:none}
@keyframes scr-in{from{opacity:0;transform:translateY(10px)}}
.app-body[data-pager]{display:flex;overflow:auto hidden;scroll-snap-type:x mandatory;scrollbar-width:none}
.app-body[data-pager]::-webkit-scrollbar{display:none}
.app-body[data-pager] .scr{position:relative;inset:auto;flex:0 0 100%;visibility:visible;animation:none;scroll-snap-align:start}

/* ---------- 4. Layers ---------- */
.sheet{position:absolute;left:0;right:0;bottom:0;z-index:30;max-height:100%;overflow:hidden auto;scrollbar-width:none;visibility:hidden;transform:translateY(104%);transition:transform .38s cubic-bezier(.2,.8,.2,1),visibility 0s .38s}
.sheet::-webkit-scrollbar{display:none}
.sheet--full{top:0}
.sheet--side{top:0;right:auto;transform:translateX(-104%)}
.sheet.is-open{visibility:visible;transform:none;transition-delay:0s}
.sheet:focus{outline:none}
.app-scrim{position:absolute;inset:0;z-index:20;background:rgba(0,0,0,.5)}
.app-scrim[hidden]{display:none}
.app-toast{position:absolute;left:16px;right:16px;bottom:104px;z-index:40;margin:0;padding:12px 16px;border-radius:14px;background:#111;color:#fff;font:500 13.5px/1.4 Geist,system-ui,sans-serif;text-align:center;box-shadow:0 12px 30px -10px rgba(0,0,0,.5);opacity:0;transform:translateY(8px);transition:opacity .25s,transform .25s;pointer-events:none}
.app-toast.is-on{opacity:1;transform:none}

/* ---------- 5. Helpers ---------- */
:where(.app) *,:where(.app) *:before,:where(.app) *:after{box-sizing:border-box}
:where(.app) :is(h2,h3,h4,p,ul,ol,figure){margin:0}
:where(.app) :is(ul,ol){padding:0;list-style:none}
:where(.app) button{margin:0;padding:0;border:0;background:none;color:inherit;font:inherit;text-align:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
:where(.app) a{color:inherit}
:where(.app) img{display:block;max-width:100%}
.app :focus-visible{outline:2px solid currentColor;outline-offset:2px}
.ic{flex:none;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ic--fill{fill:currentColor;stroke:none}
/* A photo over its colour block: if the photo is missing, the block still looks designed. */
:where(.app) .cimg{position:absolute;inset:0}

/* Narrow windows drop our words about the concept; a real phone gets the app edge to edge, with no drawn frame. */
@media (max-width:900px){
 .app-stage{grid-template-columns:auto}
 .app-about{display:none}
}
@media (max-width:640px){
 .app-stage{display:block;padding:0}
 .app-phone{width:100%;height:100%;padding:0;border-radius:0;box-shadow:none}
 .app{border-radius:0}
 .app-status{display:none}
}
@media (prefers-reduced-motion:reduce){
 .scr.is-on{animation:none}
 .sheet,.app-toast{transition:none}
 .app *,.app *:before,.app *:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}
