
:root {
  color-scheme: light;

  --bg: #f7f8fc;
  --surface: #ffffff;
  --surface-hover: #f9faff;

  --text: #182033;
  --muted: #68738a;
  --border: #e7e9f0;

  --accent: #3b4bf5;
  --accent-hover: #2939df;
  --accent-soft: #eef0ff;
  --accent-text: #ffffff;

  --success-bg: #dcfce7;
  --success-text: #166534;

  --warning-bg: #fef3c7;
  --warning-text: #92400e;

  --neutral-bg: #edf0f5;
  --neutral-text: #536078;

  --shadow:
    0 1px 3px rgba(20, 30, 60, .04),
    0 5px 18px rgba(20, 30, 60, .045);

  --shadow-hover:
    0 8px 28px rgba(20, 30, 60, .09);

  --radius: 16px;
  --radius-sm: 10px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #0d111b;
    --surface: #151b29;
    --surface-hover: #1b2334;

    --text: #edf0fa;
    --muted: #9ba7bd;
    --border: #273047;

    --accent: #7886ff;
    --accent-hover: #929dff;
    --accent-soft: #222a50;
    --accent-text: #ffffff;

    --success-bg: #153a2a;
    --success-text: #86efac;

    --warning-bg: #423419;
    --warning-text: #fcd477;

    --neutral-bg: #293247;
    --neutral-text: #bdc7d9;

    --shadow: none;
    --shadow-hover: 0 8px 28px rgba(0, 0, 0, .25);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0d111b;
  --surface: #151b29;
  --surface-hover: #1b2334;

  --text: #edf0fa;
  --muted: #9ba7bd;
  --border: #273047;

  --accent: #7886ff;
  --accent-hover: #929dff;
  --accent-soft: #222a50;
  --accent-text: #ffffff;

  --success-bg: #153a2a;
  --success-text: #86efac;

  --warning-bg: #423419;
  --warning-text: #fcd477;

  --neutral-bg: #293247;
  --neutral-text: #bdc7d9;

  --shadow: none;
  --shadow-hover: 0 8px 28px rgba(0, 0, 0, .25);
}

/* Reset */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  margin: 0;
  min-width: 320px;

  background: var(--bg);
  color: var(--text);

  font-family:
    Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;

  font-size: 16px;
  line-height: 1.6;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  transition:
    background-color .2s ease,
    color .2s ease;
}

button,
input {
  font: inherit;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

button {
  color: inherit;
}

::selection {
  background: var(--accent);
  color: white;
}

.wrap {
  width: min(1080px, calc(100% - 2.5rem));
  margin-inline: auto;
}

/* Focus */

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

#search:focus-visible {
  outline-offset: 0;
}

/* Header */

.band {
  position: relative;
  overflow: hidden;

  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.bar {
  min-height: 76px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;

  color: var(--text);
  text-decoration: none;

  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.045em;
}

.brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;

  font-size: .92rem;
  font-weight: 500;

  transition: color .15s ease;
}

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

.nav .icon-btn + .icon-btn {
  margin-left: -1rem !important;
}

.icon-btn {
  display: inline-grid;
  place-items: center;

  width: 40px;
  height: 40px;

  border: 1px solid var(--border);
  border-radius: 11px;

  background: var(--surface);
  color: var(--text);

  cursor: pointer;
  font-size: 1.15rem;

  transition:
    background .15s ease,
    border-color .15s ease,
    transform .15s ease;
}

.icon-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.icon-btn:active {
  transform: scale(.94);
}

/* Hero */

.hero {
  position: relative;
  padding: 5.5rem 0 5rem;
}

.hero h1 {
  max-width: 780px;

  margin: 0 0 1.25rem;

  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.08;

  letter-spacing: -.065em;
}

.lead {
  max-width: 560px;

  margin: 0 0 1.75rem;

  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.7;
}

/* Apps section */

.apps-section {
  padding-top: 2.5rem;
  padding-bottom: 4.5rem;
}

.apps-section h2,
.about h2 {
  margin: 0 0 1.5rem;

  font-size: 1.65rem;
  font-weight: 750;
  letter-spacing: -.045em;
}

/* Search and filters */

.tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;

  margin-bottom: 1.5rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;

  margin: 0;
}

.chip {
  padding: .45rem .9rem;

  border: 1px solid var(--border);
  border-radius: 999px;

  background: var(--surface);
  color: var(--muted);

  cursor: pointer;

  font-size: .85rem;
  font-weight: 550;

  transition:
    background .15s ease,
    border-color .15s ease,
    color .15s ease;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.chip.modifier {
  border-style: dashed;
}

.chip.modifier.active {
  border-style: solid;
}

.search-container {
  position: relative;
  flex: 0 1 280px;
}

#search {
  width: 100%;
  min-width: 0;

  padding: .7rem 1rem;

  border: 1px solid var(--border);
  border-radius: 11px;

  background: var(--surface);
  color: var(--text);

  font-size: .92rem;

  transition:
    border-color .15s ease,
    box-shadow .15s ease;
}

#search::placeholder {
  color: var(--muted);
  opacity: .75;
}

#search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 13%, transparent);
  outline: none;
}

/* App grid */

.grid {
  display: grid;

  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));

  gap: 1.15rem;
}

/* App cards */

.card {
  display: flex;
  flex-direction: column;
  gap: .5rem;

  min-width: 0;
  padding: 1.35rem;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);

  color: var(--text);
  text-decoration: none;

  box-shadow: var(--shadow);

  transition:
    transform .18s ease,
    border-color .18s ease,
    background .18s ease,
    box-shadow .18s ease;
}

a.card:hover {
  transform: translateY(-4px);

  background: var(--surface-hover);
  border-color: var(--accent);

  box-shadow: var(--shadow-hover);
  color: var(--text);
}

.card.disabled {
  opacity: .7;
  cursor: default;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;

  min-height: 44px;
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 2rem;
  line-height: 1;
}

.card-icon img {
  display: block;

  width: 42px;
  height: 42px;

  border-radius: 11px;
  object-fit: cover;
}

.card-icon-emoji {
  display: grid;
  place-items: center;

  width: 42px;
  height: 42px;

  font-size: 2rem;
  line-height: 1;
}

.card h3 {
  margin: .5rem 0 0;

  font-size: 1.12rem;
  font-weight: 700;

  letter-spacing: -.025em;
}

.card p {
  flex: 1;

  margin: 0;

  color: var(--muted);

  font-size: .9rem;
  line-height: 1.65;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;

  margin-top: .65rem;
}

.mini-tag {
  padding: .2rem .6rem;

  border: 1px solid var(--border);
  border-radius: 999px;

  background: var(--bg);
  color: var(--muted);

  font-size: .72rem;
  font-weight: 550;
}

/* Status badges */

.badge {
  display: inline-flex;
  align-items: center;

  padding: .2rem .65rem;

  border-radius: 999px;

  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .01em;
}

.badge.live {
  background: var(--success-bg);
  color: var(--success-text);
}

.badge.beta {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.badge.soon {
  background: var(--neutral-bg);
  color: var(--neutral-text);
}

/* Empty state */

.empty {
  padding: 3rem 1rem;

  color: var(--muted);
  text-align: center;
  font-size: .95rem;
}

/* About */

.about {
  max-width: 760px;

  padding-top: 2rem;
  padding-bottom: 5rem;
}

.about h2 {
  margin-bottom: 1rem;
}

.about p {
  margin: 0 0 1rem;

  color: var(--muted);
  font-size: .97rem;
  line-height: 1.8;
}

.about a {
  color: var(--accent);
  font-weight: 600;
}

/* Footer */

.site-footer {
  padding: 1.5rem 0;

  border-top: 1px solid var(--border);

  color: var(--muted);
  font-size: .85rem;
}

.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;

  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

/* Responsive */

@media (max-width: 700px) {
  .hero {
    padding: 4rem 0 3.5rem;
  }

  .tools {
    align-items: stretch;
    flex-direction: column;
  }

  .search-container {
    flex: 1;
    width: 100%;
  }

  .apps-section {
    padding-top: 1.5rem;
  }
}

@media (max-width: 520px) {
  .wrap {
    width: calc(100% - 2rem);
  }

  .bar {
    min-height: 66px;
  }

  .brand {
    font-size: 1.15rem;
  }

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

  .nav {
    gap: .85rem;
  }

  .nav .icon-btn + .icon-btn {
    margin-left: -.35rem !important;
  }

  .nav a.icon-btn {
    display: inline-grid;
  }

  .nav a {
    display: none;
  }

  .hero {
    padding: 3.5rem 0 3rem;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 11vw, 3.3rem);
  }

  .lead {
    font-size: 1rem;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: .85rem;
  }

  .card {
    padding: 1.15rem;
  }

  .apps-section h2,
  .about h2 {
    font-size: 1.45rem;
  }

  .site-footer .wrap {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
