:root {
  color-scheme: light dark;
  --bg: #f4f5f7;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #ffffff;
  --text: #17202a;
  --muted: #5f6975;
  --line: rgba(23, 32, 42, 0.13);
  --accent: #635bff;
  --accent-strong: #463ee7;
  --accent-soft: rgba(99, 91, 255, 0.12);
  --focus: #dc4c1b;
  --shadow: 0 24px 60px rgba(31, 35, 48, 0.09);
  --radius-lg: 1.75rem;
  --radius-md: 1rem;
  --shell: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1017;
    --surface: rgba(23, 29, 39, 0.8);
    --surface-strong: #171d27;
    --text: #f3f5f8;
    --muted: #a8b0bd;
    --line: rgba(255, 255, 255, 0.13);
    --accent: #9d97ff;
    --accent-strong: #bbb7ff;
    --accent-soft: rgba(157, 151, 255, 0.14);
    --focus: #ffb087;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  }
}

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

html {
  min-width: 20rem;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, var(--accent-soft), transparent 26rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 0.2rem solid var(--focus);
  outline-offset: 0.25rem;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.5rem;
  background: var(--surface-strong);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(calc(100% - 2rem), var(--shell));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(1rem);
}

.site-header__inner,
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header__inner {
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 760;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 0.65rem;
  color: #fff;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  box-shadow: 0 0.6rem 1.4rem var(--accent-soft);
  font-size: 0.9rem;
}

.site-header__status,
.catalog__count,
.site-footer {
  color: var(--muted);
  font-size: 0.88rem;
}

.hero {
  padding-block: clamp(5rem, 12vw, 9rem) clamp(4rem, 9vw, 7rem);
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.12;
}

h1 {
  max-width: 13ch;
  margin-bottom: 1.5rem;
  font-size: clamp(2.75rem, 8vw, 6.7rem);
  letter-spacing: -0.065em;
}

h1 span {
  color: var(--muted);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  letter-spacing: -0.045em;
}

.hero__lede {
  max-width: 39rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.catalog {
  padding-bottom: clamp(5rem, 10vw, 8rem);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.catalog__count {
  margin: 0 0 0.2rem;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1rem;
}

.app-card {
  display: flex;
  min-height: 15rem;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.app-card:hover {
  border-color: var(--accent);
  transform: translateY(-0.25rem);
}

.app-card h3 {
  margin-bottom: 0.6rem;
  font-size: 1.35rem;
}

.app-card p {
  margin: 0;
  color: var(--muted);
}

.app-card__action {
  color: var(--accent-strong);
  font-weight: 750;
}

.empty-state,
.notice {
  padding: clamp(2rem, 7vw, 5rem) 1.5rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}

.empty-state__symbol {
  display: grid;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1.25rem;
  place-items: center;
  border-radius: 50%;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 1.8rem;
}

.empty-state h3 {
  margin-bottom: 0.55rem;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.empty-state p,
.notice {
  margin-bottom: 0;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
}

.site-footer__inner {
  min-height: 5rem;
}

.site-footer p {
  margin: 0;
}

.error-page {
  display: grid;
  min-height: 100vh;
  align-content: center;
  justify-items: start;
}

.error-page h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.6rem, 8vw, 5.5rem);
}

.error-page > p:not(.eyebrow) {
  max-width: 34rem;
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.button-link {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  padding: 0.65rem 1rem;
  border-radius: 0.75rem;
  color: #fff;
  background: var(--accent-strong);
  font-weight: 750;
  text-decoration: none;
}

@media (max-width: 40rem) {
  .site-header__status,
  .site-footer__inner > p:last-child {
    display: none;
  }

  .hero {
    padding-top: 4.5rem;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

