/* Vo Apps - the launcher page for the personal apps on voapps.ai.
   Same dark palette as the apps themselves. System font, no web fonts, no scripts,
   nothing loaded from other sites (the page's CSP is style-src/img-src 'self'). */

:root {
  --bg: #0b0d10;
  --surface: #15181d;
  --surface-2: #1f242b;
  --line: #2c333d;
  --text: #f6f8fa;
  --muted: #aab3bf;
  --faint: #8a94a1;
  --blue: #2563eb;        /* white text 5.2:1 */
  --blue-text: #8fb6ff;
  --red: #d93036;         /* white text 4.7:1 */
  --red-text: #ff9a9e;
  --radius: 22px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --sat: env(safe-area-inset-top, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background:
    radial-gradient(900px 420px at 50% -180px, rgba(37, 99, 235, 0.16), rgba(37, 99, 235, 0) 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}

.page {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 760px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding:
    calc(var(--sat) + 36px)
    calc(var(--sar) + 16px)
    calc(var(--sab) + 20px)
    calc(var(--sal) + 16px);
}

/* ---------------------------------------------------------------- header */

.top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 4px 28px;
}

.mark {
  display: grid;
  grid-template-columns: repeat(2, 12px);
  gap: 4px;
  flex: none;
}

.mark i {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--line);
}

.mark i:nth-child(1) {
  background: var(--blue);
}

.mark i:nth-child(2) {
  background: var(--red);
}

h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* ---------------------------------------------------------------- app cards */

.apps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.app {
  --accent: var(--blue);
  --accent-text: var(--blue-text);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface) 64px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 32px rgba(0, 0, 0, 0.28);
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.app--red {
  --accent: var(--red);
  --accent-text: var(--red-text);
}

.app:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 40px rgba(0, 0, 0, 0.36);
}

.app:active {
  transform: translateY(0) scale(0.99);
}

.app-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.badge {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 15px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.badge svg {
  display: block;
}

h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.app p {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

/* The link is the "Open" pill, stretched over the whole card so every part of it is a tap target. */
.open {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 4px;
  padding: 0 18px 0 20px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.open::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

.open:focus {
  outline: none;
}

.open:focus-visible::after {
  outline: 3px solid var(--accent-text);
  outline-offset: 3px;
}

.arrow {
  font-size: 18px;
  line-height: 1;
  transition: transform 0.16s ease;
}

.app:hover .arrow {
  transform: translateX(3px);
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------- footer */

.foot {
  margin-top: auto;
  padding-top: 40px;
  color: var(--faint);
  font-size: 14px;
  text-align: center;
  letter-spacing: 0.02em;
}

/* ---------------------------------------------------------------- larger screens */

@media (min-width: 640px) {
  .page {
    padding-top: calc(var(--sat) + 72px);
  }

  .top {
    margin-bottom: 36px;
  }

  h1 {
    font-size: 36px;
  }

  .apps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .app {
    min-height: 236px;
    padding: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app,
  .arrow {
    transition: none;
  }

  .app:hover,
  .app:active,
  .app:hover .arrow {
    transform: none;
  }
}
