/* demo.gravitatech.com landing page. Builds on the main site's site.css, personas.css and motion.css (copied from the live main site, 29 Oct 2026);
   adds only the compact hero and the demo gallery. Main site rules: orange only on buttons, accent blue for marks, labels at least 14 px. */

/* Gallery view (his words, 30 Oct 2026: "GALLERY view! ... no need to put a featured app on top ... not long scroll";
   his "GO, both leans": a short title band, filter buttons for the groups, one grid of equal tiles). */

/* short title band: the heading and WhatsApp on navy, no photo, so the gallery starts on the first screen */
/* light mode is light throughout (1 Nov 2026): the title band is a pale blue-grey field with navy text and a hairline in light; dark keeps the navy band */
.demo-band{background:light-dark(#EEF2FA,#0C1844);color:light-dark(#0C1844,#fff);box-shadow:inset 0 -1px 0 light-dark(rgba(12,24,68,.12),transparent);padding-block:var(--s5)}
.demo-band .wrap{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--s3)}
.demo-band h1{color:light-dark(#0C1844,#fff);margin:0}

/* gallery */
.demo-gallery{padding-block:var(--s4) var(--s6)}
.demo-gallery > .wrap{gap:var(--s4)}

/* group filter: plain text buttons with an accent underline for the shown group (no pills) */
.g-filter{display:flex;flex-wrap:wrap;gap:0 var(--s3);border-bottom:1px solid var(--line)}
.g-filter[hidden]{display:none}
.g-filter button{appearance:none;background:none;border:0;border-bottom:3px solid transparent;margin-bottom:-1px;padding:12px 2px;font:inherit;font-size:var(--fs-1);font-weight:700;color:var(--muted);cursor:pointer;min-height:44px}
.g-filter button:hover{color:var(--text)}
.g-filter button[aria-pressed="true"]{color:var(--text);border-bottom-color:var(--accent)}
.g-filter button:focus-visible{outline:3px solid var(--focus);outline-offset:2px}

/* one grid of equal tiles: 4 a row on desktop, 3 on tablets, 2 on phones */
.g-grid.g-gallery{grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--s3)} /* two classes: wins over the .g-grid rules below */
.g-gallery > li[hidden]{display:none}
.g-gallery .g-card .g-body{padding:var(--s2) var(--s3) var(--s3)}
.g-gallery .g-card .demo-name{font-size:var(--fs-1)}
.g-gallery .g-card .demo-foot{margin-top:var(--s1);flex-direction:column;align-items:flex-start;gap:2px}
/* the address breaks only after "demo.gravitatech.com/", never inside the app's own part ("personal- / budget") */
.demo-path{white-space:nowrap}

/* shared labels */
.demo-foot{display:flex;flex-wrap:wrap;align-items:center;gap:var(--s1) var(--s2);margin-top:var(--s1)}
.demo-url{font-size:var(--fs-0);color:var(--muted);overflow-wrap:anywhere}
.demo-status{display:inline-flex;align-items:center;gap:6px;font-size:.875rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.demo-status::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--accent)}

/* featured app with its real screenshot, on the navy stage */
.g-feature{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);align-items:center;gap:var(--s5);padding:var(--s5);border-radius:var(--radius-lg);background:var(--navy);color:var(--on-navy);margin-bottom:var(--s6);overflow:hidden}
.g-feature .g-shot{margin:0;border-radius:12px;overflow:hidden;box-shadow:0 18px 50px rgba(2,6,26,.55);border:1px solid rgba(255,255,255,.12);aspect-ratio:16/10;background:#0C1844}
.g-feature .g-shot img{display:block;width:100%;height:100%;object-fit:cover;object-position:left top}
/* on the navy stage the light accent reads; #2A4BB0 would be too dark here */
.g-feature .demo-group{margin:0;font-size:var(--fs-0);font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#8FA6EE}
.g-feature h2{margin:var(--s2) 0 0;color:var(--on-navy);font-size:clamp(2.5rem,4.4vw,3.75rem);line-height:1.02;letter-spacing:-.02em}
.g-feature .demo-by{display:block;margin-top:6px;font-size:var(--fs-2);font-weight:400;color:var(--on-navy-muted)}
.g-feature .demo-foot{margin-top:var(--s4);flex-direction:column;align-items:flex-start;gap:6px}
.g-feature .demo-url{color:var(--on-navy-muted);font-size:var(--fs-1)}
.g-feature .demo-status{color:var(--on-navy)}
.g-feature .demo-status::before{background:#8FA6EE}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .g-feature{border:1px solid var(--line)}}
:root[data-theme="dark"] .g-feature{border:1px solid var(--line)}

/* image cards */
.g-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--s4)}
.g-card{display:flex;flex-direction:column;min-width:0;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow);overflow:hidden}
.g-card .g-shot{margin:0;aspect-ratio:16/10;overflow:hidden;background:light-dark(#EEF2FA,var(--navy));border-bottom:1px solid var(--line)}
.g-card .g-shot img{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
.g-card .g-shot picture{display:block;width:100%;height:100%}
.g-card .g-shot.is-screen img{width:150%;height:150%;max-width:none;object-position:left top}
.g-card .g-body{display:flex;flex-direction:column;gap:2px;padding:var(--s3)}
.g-card .demo-name{font-size:var(--fs-2);font-weight:700;line-height:1.2;color:var(--text)}
.g-card .demo-by{font-size:var(--fs-0);color:var(--muted)}
.g-card .demo-foot{margin-top:var(--s2)}

/* groups by need: heading on the left, two columns of cards on the right */
.g-cat{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:var(--s4);padding-block:28px;border-top:1px solid var(--line)} /* 28 px, not --s4: keeps the page under 5,400 px with the Stock Opname "How to try" line */
.g-cat > h2{grid-column:1 / span 3;font-size:var(--fs-3);padding-top:var(--s1)}
.g-cat > .g-grid{grid-column:4 / -1;grid-template-columns:repeat(2,minmax(0,1fr))}
/* a group with one app: the card runs the full width, image beside the text, so no empty half */
.g-cat > .g-grid.is-single{grid-template-columns:minmax(0,1fr)}
.g-grid.is-single .g-card{flex-direction:row}
.g-grid.is-single .g-card .g-shot{flex:0 0 50%;border-bottom:0;border-right:1px solid var(--line)}
.g-grid.is-single .g-card .g-body{justify-content:center;padding:var(--s4)}

@media (max-width:1100px){
  .g-grid.g-gallery{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:960px){
  .g-feature{grid-template-columns:minmax(0,1fr);gap:var(--s4)}
  .g-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .g-cat > h2,.g-cat > .g-grid{grid-column:1 / -1}
  .g-grid.g-gallery{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:760px){
  /* phone band: one short row, heading and button side by side, so the tiles start on the first screen */
  .demo-band{padding-block:var(--s3)}
  .demo-band .wrap{flex-wrap:nowrap;gap:var(--s2)}
  .demo-band h1{font-size:1.5rem;line-height:1.15}
  .demo-band .btn{flex:none;min-height:44px;padding:0 14px;font-size:17px}
  .demo-gallery{padding-block:var(--s3) var(--s5)}
  .demo-gallery > .wrap{gap:var(--s3)}
  /* the group buttons stay on one line and scroll inside their own row, never the page */
  .g-filter{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;gap:0 var(--s3)}
  .g-filter::-webkit-scrollbar{display:none}
  .g-filter button{flex:none}
  .g-feature{padding:var(--s3);margin-bottom:var(--s3)}
  /* phone: a wider image crop and tighter cards keep the page under the main site's 8,400 px limit */
  .g-grid,.g-cat > .g-grid{grid-template-columns:minmax(0,1fr);gap:var(--s2)}
  .g-cat{gap:var(--s2);padding-block:var(--s2)}
  .g-card .g-shot{aspect-ratio:2/1}
  /* drawings keep their own 16:10 so nothing at their edges is cut (the 2:1 crop cut the Biz Dashboard cup, 30 Oct 2026) */
  .g-card .g-shot:not(.is-screen){aspect-ratio:16/10}
  .g-card .g-body{padding:var(--s2) var(--s3)}
  .g-card .demo-foot{margin-top:var(--s1);flex-direction:column;align-items:flex-start;gap:2px}
  .g-grid.is-single .g-card{flex-direction:column}
  .g-grid.is-single .g-card .g-shot{flex:none;border-right:0;border-bottom:1px solid var(--line)}
  .g-grid.is-single .g-card .g-body{padding:var(--s2) var(--s3)}
  /* phone gallery: three tiles a row (his words, 30 Oct 2026: "Gallery like at least 3 columns"); picture, name and
     status only, as "by Gravita Tech" and the address do not fit a 110 px tile (they show from 761 px up) */
  .g-grid.g-gallery{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
  .g-gallery .g-card{border-radius:12px}
  /* each picture keeps its own 16:10 so no drawing edge is cut; a screenshot shows whole */
  .g-gallery .g-card .g-shot,.g-gallery .g-card .g-shot:not(.is-screen){aspect-ratio:16/10}
  .g-gallery .g-card .g-shot.is-screen img{width:100%;height:100%}
  .g-gallery .g-card .g-body{padding:8px 8px 10px;gap:0}
  .g-gallery .g-card .demo-name{font-size:17px;line-height:1.2}
  .g-gallery .g-card .demo-by,.g-gallery .g-card .demo-url{display:none}
  .g-gallery .g-card .demo-foot{margin-top:4px}
  .g-gallery .g-card .demo-status{font-size:.75rem;letter-spacing:0;gap:4px;white-space:nowrap}
  .g-gallery .g-card.is-live > .g-card-guide{margin:-4px 8px 10px;font-size:.875rem}
}
@media (max-width:374px){
  /* very narrow phones: the status may take two lines rather than touch the tile edge */
  .g-gallery .g-card .demo-status{white-space:normal;align-items:flex-start}
  .g-gallery .g-card .demo-status::before{margin-top:.45em;flex:none}
}

/* Stock Opname guide page (his 7A and 8A, 29 Oct 2026) and the tile's "How to try" link */
.demo-guide{font-size:var(--fs-0);font-weight:700;color:var(--accent-text)}
/* a live card's own guide link: a sibling after the card's link (links cannot nest), set under the address line */
.g-card.is-live > .g-card-guide{align-self:flex-start;margin:calc(var(--s1) - var(--s3)) var(--s3) var(--s3)}
@media (max-width:760px){
  .g-card.is-live > .g-card-guide{margin:calc(2px - var(--s2)) var(--s3) var(--s2)}
}
/* Mobile Capture's Android download QR (his D2 and "Same as button", 31 Oct 2026): for desktop visitors to scan
   with their phone; the QR keeps a white field so it scans in dark mode too. Hidden on phones, which use the app's own button. */
.g-card.is-live > .g-card-apk{display:flex;align-items:center;gap:var(--s2);margin:calc(var(--s1) - var(--s3)) var(--s3) var(--s3);font-size:17px;color:var(--accent-text);text-decoration:none}
.g-card-apk img{flex:none;width:76px;height:76px;padding:4px;background:#fff;border:1px solid var(--line);border-radius:8px}
.g-card-apk:hover span{text-decoration:underline}
.g-card-apk:focus-visible{outline:3px solid var(--focus);outline-offset:2px;border-radius:8px}
@media (max-width:760px){
  .g-card.is-live > .g-card-apk{display:none}
}
.guide-crumb{display:flex;flex-wrap:wrap;gap:var(--s1) var(--s3)}
.guide-intro .demo-group a{color:inherit;text-decoration:none}
.guide-intro .demo-group a:hover{color:var(--accent-text)}
.guide-intro h1{font-size:var(--fs-5)}
.guide-intro h1 .demo-by{display:block;font-size:var(--fs-2);font-weight:400;color:var(--muted)}
.guide-points{margin:0;padding-left:1.2em;display:flex;flex-direction:column;gap:var(--s1)}
.guide-points li::marker{color:var(--accent)}
.guide-open{font-weight:700}
.guide-shot{margin:0;border-radius:var(--radius-lg);overflow:hidden;border:1px solid var(--line);box-shadow:var(--shadow)}
.guide-shot img{display:block;width:100%;height:auto}
.guide-body{max-width:72ch;display:flex;flex-direction:column;gap:var(--s2)}
.guide-body ul{margin:0;padding-left:1.2em;display:flex;flex-direction:column;gap:var(--s1)}
.guide-body li::marker{color:var(--accent)}
.guide.section{padding-block:var(--s6)}

/* header: the full menu needs about 940 px (EN) and 840 px (ID); site.css switches to the
   menu button only at 760 px, so 761 to 960 px scrolled sideways. Same rules as site.css's 760 block
   (no min-width: a fractional viewport such as 760.5 px would fall between two queries). */
@media (max-width:960px){
  .menu-toggle{display:grid}
  .nav{position:fixed;inset:84px 0 auto 0;background:var(--bg);border-bottom:1px solid var(--line);flex-direction:column;align-items:stretch;gap:var(--s2);padding:var(--s3) max(var(--s3),env(safe-area-inset-left,0px));display:none}
  .nav.open{display:flex}
  .nav ul{flex-direction:column;gap:0}
  .nav ul a{display:block;padding:14px 0;border-bottom:1px solid var(--line)}
  .nav ul a[aria-current="page"]{border-bottom-color:var(--line);color:var(--accent-text)}
  .lang{align-self:flex-start}
}
