/* kem108.dev design system (from the homepage): red liquid glass on black, SF Pro with Apple's type scale. */
:root {
  --bg: #000;
  --line: rgba(255, 82, 92, .16);
  --text: #f7f2f3;
  --text-2: #bdb1b3;
  --text-3: #85797b;
  --red: #ff453a;
  --red-hot: #ff2a2a;
  --sf: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", Inter, "Segoe UI Variable Text", "Segoe UI", Roboto, system-ui, sans-serif;
  --sf-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro", Inter, "Segoe UI Variable Display", "Segoe UI", Roboto, system-ui, sans-serif;
  --ease: cubic-bezier(.2, .75, .2, 1);
  --spring: cubic-bezier(.34, 1.5, .64, 1);
  --tab: 76px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.47 var(--sf);
  letter-spacing: -.022em;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
::selection { background: rgba(255, 42, 52, .5); color: #fff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
a { color: inherit; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }
.tld { color: var(--red); }
kbd {
  display: inline-block; padding: 1px 7px;
  border-radius: 8px; border: 1px solid rgba(255, 110, 118, .35);
  background: rgba(255, 60, 70, .1);
  font: 500 .92em/1.4 var(--sf); letter-spacing: 0;
}

/* ---------- red Liquid Glass ---------- */
.glass {
  position: relative;
  isolation: isolate;
  background: linear-gradient(180deg, rgba(255, 96, 96, .15), rgba(255, 40, 52, .04) 60%), rgba(34, 3, 7, .52);
  -webkit-backdrop-filter: blur(22px) saturate(1.8);
  backdrop-filter: var(--lg, blur(22px) saturate(1.8));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .26),
    inset 0 0 0 1px rgba(255, 66, 76, .36),
    0 18px 44px rgba(0, 0, 0, .45);
}
.glass::before {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, .62), rgba(255, 150, 155, .22) 28%, rgba(255, 255, 255, 0) 48%, rgba(255, 90, 100, .12) 70%, rgba(255, 175, 180, .45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.glass::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, -40%), rgba(255, 220, 222, .13), rgba(255, 255, 255, 0) 60%);
  opacity: 0;
  transition: opacity .35s;
}
.glass.is-lit::after { opacity: 1; }
.glass > * { position: relative; z-index: 2; }
html[data-tier="low"] .glass:not(.is-refracting) {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: linear-gradient(180deg, rgba(255, 96, 96, .14), rgba(255, 40, 52, .03) 60%), rgba(36, 4, 8, .9);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 24px;
  border: 0; border-radius: 980px;
  font: 500 17px/1.2 var(--sf); letter-spacing: -.015em;
  color: #fff; text-decoration: none;
  cursor: pointer;
  transition: transform .35s var(--spring), box-shadow .25s, opacity .25s;
}
.btn:hover { transform: scale(1.035); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn-tinted.glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 52%), linear-gradient(180deg, rgba(220, 30, 40, .82), rgba(150, 8, 20, .86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 0 0 1.5px var(--red-hot), 0 10px 26px rgba(0, 0, 0, .45);
}
.btn-tinted.glass:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 0 0 1.5px #ff4a4a, 0 12px 30px rgba(0, 0, 0, .5); }
html[data-tier="low"] .btn-tinted.glass:not(.is-refracting) { background: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 52%), linear-gradient(180deg, #d81e28, #96081a); }
.chev { flex: none; width: .95em; height: .95em; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- app icons: iOS squircles in kem108 reds ---------- */
.app-icon {
  flex: none;
  display: grid; place-items: center;
  width: 56px; height: 56px;
  border-radius: 23%;
  color: #fff;
  background: linear-gradient(180deg, var(--c1), var(--c2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), inset 0 0 0 1px rgba(255, 120, 126, .35), 0 6px 18px rgba(0, 0, 0, .4);
}
.app-icon svg, .sq svg { width: 58%; height: 58%; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.app-icon-lg { width: 76px; height: 76px; }
.c-red { --c1: #ff6b61; --c2: #e0241b; }
.c-crimson { --c1: #ff4d6d; --c2: #b3002d; }
.c-ember { --c1: #ff7a52; --c2: #c2290e; }
.c-wine { --c1: #9a1a2a; --c2: #3e050c; color: #ffd4d8; }
.c-hole { --c1: #2a0408; --c2: #000; color: #ff4a40; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), inset 0 0 0 1px rgba(255, 70, 70, .6), 0 0 0 1px rgba(255, 40, 40, .15), 0 6px 18px rgba(0, 0, 0, .5); }
.sq { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 8px; color: #fff; background: linear-gradient(180deg, var(--c1), var(--c2)); box-shadow: inset 0 0 0 1px rgba(255, 130, 136, .3); }
.sq svg { width: 18px; height: 18px; stroke-width: 2; }

/* ---------- nav: floating red glass capsule with an iOS-style magnifying selection ---------- */
.nav-wrap {
  position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); left: 0; right: 0; z-index: 20;
  display: flex; justify-content: center;
  padding: 0 12px;
  pointer-events: none;
}
.nav {
  display: flex; align-items: center;
  max-width: 100%; height: 52px;
  padding: 6px 6px 6px 20px;
  border-radius: 999px;
  pointer-events: auto;
}
.brand { font: 700 17px/1 var(--sf-display); letter-spacing: -.03em; color: var(--text); white-space: nowrap; }
.brand span { color: var(--red); }
.tabs { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: var(--tab); height: 40px; margin: 0 6px 0 14px; }
.tabs > a {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  border-radius: 999px;
  font: 500 14px/1 var(--sf); letter-spacing: -.01em;
  color: var(--text-2); text-decoration: none;
  transition: color .2s;
}
.tabs > a:hover { color: var(--text); }
.tab-lens {
  position: absolute; z-index: 2; left: 0; top: 0;
  width: var(--tab); height: 40px;
  border-radius: 999px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, 0) 55%), linear-gradient(180deg, #e3262f, #a20d1b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 0 0 1px rgba(255, 90, 96, .9), 0 4px 16px rgba(0, 0, 0, .4);
  transition: opacity .25s, transform .45s var(--spring);
}
.tab-lens.is-on { opacity: 1; }
.tab-lens-row { position: absolute; left: 0; top: 0; height: 40px; display: grid; grid-auto-flow: column; grid-auto-columns: var(--tab); transform-origin: 0 0; transition: transform .45s var(--spring); }
.tab-lens-row > span { display: grid; place-items: center; font: 600 14px/1 var(--sf); letter-spacing: -.01em; color: #fff; }

/* ---------- switch ---------- */
.switch { display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); cursor: pointer; }
.switch input {
  position: relative; flex: none;
  width: 42px; height: 26px; margin: 0;
  border-radius: 999px;
  background: rgba(130, 110, 112, .38);
  appearance: none; -webkit-appearance: none;
  cursor: pointer;
  transition: background .25s;
}
.switch input::before {
  content: "";
  position: absolute; top: 2px; left: 2px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
  transition: transform .35s var(--spring);
}
.switch input:checked { background: var(--red); }
.switch input:checked::before { transform: translateX(16px); }

/* ---------- background: black with red light ---------- */
.bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(70% 55% at 50% -8%, rgba(170, 0, 18, .42), rgba(170, 0, 18, 0) 70%),
    radial-gradient(55% 45% at 100% 100%, rgba(120, 0, 14, .22), rgba(120, 0, 14, 0) 70%);
}
@keyframes rise-in { from { opacity: 0; transform: translateY(28px); } }
@keyframes drop-in { from { opacity: 0; transform: translateY(-20px) scale(.96); } }
@keyframes fade-in { from { opacity: 0; } }
