:root {
  color-scheme: light dark;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --accent: #4f46e5;
  --accent-2: #06b6d4;
  --shadow: 0 1px 2px rgb(15 23 42 / 0.04), 0 8px 24px rgb(15 23 42 / 0.06);
  --shadow-hover: 0 2px 4px rgb(15 23 42 / 0.06), 0 16px 40px rgb(79 70 229 / 0.14);
  --radius: 18px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --surface: #131a2e;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --line: #222c45;
    --accent: #818cf8;
    --accent-2: #22d3ee;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3);
    --shadow-hover: 0 16px 40px rgb(0 0 0 / 0.45), 0 0 0 1px rgb(129 140 248 / 0.35);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(55% 520px at 15% 0, rgb(79 70 229 / 0.16), transparent),
    radial-gradient(45% 460px at 90% 0, rgb(6 182 212 / 0.13), transparent),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.brand img { width: 32px; height: 32px; }

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  margin-left: 20px;
}

.nav a:hover { color: var(--text); }

main { flex: 1; }

.hero { padding: 72px 0 56px; }

.hero h1 {
  margin: 0 0 16px;
  max-width: 16ch;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.hero h1 span {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: 1.15rem;
}

.section-title {
  margin: 0 0 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.apps { padding-bottom: 88px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}

.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

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

.card-head img {
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 14px;
}

.card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 6px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.badges li {
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

.go {
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
}

.go::after {
  content: " \2192";
  display: inline-block;
  transition: transform 0.18s ease;
}

.card:hover .go::after { transform: translateX(3px); }

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.site-footer a { color: inherit; }
.site-footer a:hover { color: var(--text); }

.not-found { padding: 120px 0; }
.not-found h1 { margin: 0 0 8px; font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.03em; }
.not-found p { margin: 0 0 24px; color: var(--muted); }

.button {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 560px) {
  .wrap { padding: 0 18px; }
  .hero { padding: 44px 0 36px; }
  .nav a:first-child { display: none; }
  .grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .go::after { transition: none; }
  .card:hover, .card:focus-visible { transform: none; }
}
