/*
 * pages-glass.css: the About page and the manual in the app's glass look (as glass.css for the collection). Loaded after
 * pages.css. Kind to the GPU: one blur only, the nav that content scrolls under; every card is frosted colour on the
 * still room, and nothing animates forever.
 */
:root {
  --g-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --g-bg: #0b0b0e;
  --g-fill: rgba(34, 34, 40, .78);
  --g-fill-2: rgba(255, 255, 255, .07);
  --g-fill-3: rgba(255, 255, 255, .13);
  --g-line: rgba(255, 255, 255, .10);
  --g-hi: rgba(255, 255, 255, .13);
  --g-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --g-r: 22px;
}
html[data-ui="light"] {
  --g-bg: #ecebf1;
  --g-fill: rgba(255, 255, 255, .8);
  --g-fill-2: rgba(0, 0, 0, .05);
  --g-fill-3: rgba(0, 0, 0, .09);
  --g-line: rgba(0, 0, 0, .08);
  --g-hi: rgba(255, 255, 255, .9);
  --g-shadow: 0 10px 30px rgba(30, 30, 60, .12);
}

/* the room: dark (or pale), glowing amber and violet; a fixed layer of its own, painted once */
body { background: var(--g-bg); font-family: var(--g-font); }
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vw 60vh at 85% 0%, color-mix(in srgb, var(--amber) 22%, transparent), transparent 70%),
    radial-gradient(55vw 55vh at 5% 100%, color-mix(in srgb, #6a5acd 22%, transparent), transparent 70%);
}
section.s, section.s.alt { background: transparent; border-top: 0; }
.foot { border-top: 0; }

/* the nav: a floating glass bar (the one blur: the page scrolls under it) */
.nav { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; border: 0; box-shadow: none; padding-top: 10px; }
.nav .wrap {
  height: 56px; padding: 0 10px 0 16px; border-radius: 999px; border: 1px solid var(--g-line);
  background: color-mix(in srgb, var(--g-bg) 62%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 var(--g-hi), var(--g-shadow);
  max-width: calc(var(--wrap) - 2 * var(--gut));
}
.nav a.l, .nav .ic { border-radius: 999px; }
.nav a.l:hover, .nav a.l[aria-current="page"], .nav .ic:hover { background: var(--g-fill-3); }
.dot { border: 0; }

/* buttons: capsules */
.btn { border-radius: 999px; border: 0; background: var(--g-fill-2); box-shadow: inset 0 1px 0 var(--g-hi), inset 0 0 0 1px var(--g-line); font-family: var(--g-font); font-weight: 650; }
.btn:hover { background: var(--g-fill-3); }
.btn:active { transform: scale(.96); }
.btn.primary { background: var(--amber); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 8px 24px color-mix(in srgb, var(--amber) 35%, transparent); }
.btn.sm { border-radius: 999px; }
.btn.glow { animation: none !important; }   /* (it glows, still: a pulse repainted every frame) */
.btn.live { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cyan) 55%, transparent); }
.btn.deck { box-shadow: inset 0 0 0 1px color-mix(in srgb, #1a9fff 55%, transparent); }
.btn.pi { box-shadow: inset 0 0 0 1px color-mix(in srgb, #c51a4a 55%, transparent); }
html[data-ui="light"] .btn.pi { color: #b01641; }   /* (the lighter raspberry is for dark rooms) */

/* cards: frosted glass, rounded, lit at the top edge */
.plat, .gcard, .births a, .chapters a, .note, .lcd, .clock div, .toc, .tbl, .code, .doc li > pre {
  border: 1px solid var(--g-line) !important; border-radius: var(--g-r);
  background: var(--g-fill) !important;
  box-shadow: inset 0 1px 0 var(--g-hi), var(--g-shadow);
}
.plat.feature { background: linear-gradient(135deg, color-mix(in srgb, var(--amber) 18%, transparent), var(--g-fill)) !important; }
.plat .pi { border-radius: 14px; background: var(--g-fill-2); }
.gcard { overflow: hidden; }
.births a, .chapters a { border-radius: 18px; }
.lcd { border-radius: 999px; padding: 7px 14px; }
.clock div { border-radius: 18px; }
.code, .doc li > pre { border-radius: 16px; }
/* light mode: the code cards are pale glass now, so the text is dark ink (pages.css made it pale for the old black card) */
html[data-ui="light"] .code, html[data-ui="light"] .doc li > pre { color: var(--ink); }
html[data-ui="light"] .code .c { color: #7a7468; } html[data-ui="light"] .code .k { color: #a65800; }
html[data-ui="light"] .code .s { color: #1d7a43; } html[data-ui="light"] .code .f { color: #0b6a99; }
.dev { border-radius: 18px; }
.devbox { border-radius: 0 0 17px 17px; }
.hear { border-radius: 999px; }
.where span { border-radius: 999px; background: var(--g-fill-2); border-color: var(--g-line); }
kbd { border-radius: 7px; background: var(--g-fill-2); border-color: var(--g-line); box-shadow: inset 0 -1px 0 var(--g-line); }

/* the manual: a glass contents card, tables as cards */
.toc { padding: 10px; }
.toc a { border-radius: 12px; border-left: 0; }
.toc a.here { background: color-mix(in srgb, var(--amber) 20%, transparent); }
.toc a:hover { background: var(--g-fill-3); }
.tblw { border-radius: var(--g-r); }
.tbl { border-collapse: separate; border-spacing: 0; overflow: hidden; }
.tbl th, .tbl td { border-bottom: 1px solid var(--g-line); padding: 10px 14px; }
.tbl tr:last-child td { border-bottom: 0; }
.note { border-radius: 18px; padding: 16px 18px; }
.doc h2 { border-top: 0; }
.doc p, .doc li { font-family: var(--g-font); }
@media (max-width: 900px) { .toc { border-radius: var(--g-r); } }

/* the lists of the dropdowns (opened menus) are the page's dark or light, not the system's white with pale letters */
html { color-scheme: dark; }
html[data-ui="light"] { color-scheme: light; }
select option, select optgroup { background-color: #1e1e24; color: #f2f2f5; }
html[data-ui="light"] select option, html[data-ui="light"] select optgroup { background-color: #fafafc; color: #1c1c1e; }
