:root {
  color-scheme: light dark;
  --bg: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --secondary: #6e6e73;
  --separator: rgba(0, 0, 0, 0.12);
  --fill: rgba(118, 118, 128, 0.12);
  --blue: #0071e3;
  --header: rgba(251, 251, 253, 0.82);
  --focus: #0071e3;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.shell {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  background: var(--header);
  border-bottom: 0.5px solid var(--separator);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.nav {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.brand-mark {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: var(--text);
  color: var(--surface);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
}

.nav-links { display: flex; gap: 28px; }

.nav-links a,
footer a {
  color: var(--secondary);
  font-size: 13px;
  text-decoration: none;
}

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

.intro { padding: 112px 0 92px; }

.eyebrow {
  margin: 0 0 12px;
  color: var(--secondary);
  font-size: 14px;
  font-weight: 600;
}

h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(52px, 8vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.058em;
  font-weight: 700;
}

.intro-copy {
  max-width: 580px;
  margin: 32px 0 0;
  color: var(--secondary);
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.42;
  letter-spacing: -0.018em;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.section-heading h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.about-card {
  border-radius: 28px;
  padding: clamp(34px, 6vw, 68px);
  background: var(--surface);
}

.about-card h2 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.about-card > p:not(.eyebrow) {
  max-width: 720px;
  margin: 20px 0 0;
  color: var(--secondary);
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.48;
  letter-spacing: -0.012em;
}

.get {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.text-link { color: #0059b3; font-size: 15px; font-weight: 500; text-decoration: none; }
.about-card .text-link { display: inline-block; margin-top: 28px; }
.store-price { margin-left: 3px; font-variant-numeric: tabular-nums; }

.catalog { padding: 112px 0 90px; }

.catalog-heading { align-items: center; }

.catalog-heading p {
  margin: 7px 0 0;
  color: var(--secondary);
  font-size: 15px;
}

.search {
  width: min(280px, 42vw);
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  background: var(--fill);
  border-radius: 11px;
}

.search svg {
  width: 17px;
  fill: none;
  stroke: var(--secondary);
  stroke-width: 1.7;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
}

.search:focus-within { outline: 3px solid color-mix(in srgb, var(--focus) 28%, transparent); }

.app-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 44px;
}

.app-row {
  min-width: 0;
  min-height: 120px;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border-top: 0.5px solid var(--separator);
}

.app-row:nth-child(-n + 2) { border-top: 0; }
.app-row[hidden] { display: none; }

.app-row > img {
  width: 84px;
  height: 84px;
  border-radius: 22%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.app-details { min-width: 0; }
.app-details h3 { margin: 0; font-size: 17px; line-height: 1.24; letter-spacing: -0.012em; }
.app-details p { margin: 5px 0 0; color: var(--secondary); font-size: 14px; line-height: 1.35; }

.app-actions { display: flex; align-items: center; gap: 13px; }
.app-actions > a:not(.get) { color: var(--blue); font-size: 13px; text-decoration: none; }
.get { min-width: 58px; min-height: 32px; padding: 0 15px; background: var(--fill); color: var(--blue); font-variant-numeric: tabular-nums; }

.get:hover { filter: brightness(0.96); }

.text-link:focus-visible,
.get:focus-visible,
.app-actions a:focus-visible,
.nav a:focus-visible,
footer a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 45%, transparent);
  outline-offset: 3px;
}

.empty-state { padding: 52px 0; color: var(--secondary); text-align: center; }

footer { border-top: 0.5px solid var(--separator); }

.footer-inner {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--secondary);
  font-size: 13px;
}

.footer-inner div { display: flex; gap: 24px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 760px) {
  .shell { width: min(100% - 32px, 640px); }
  .intro { padding: 82px 0 70px; }
  h1 { font-size: clamp(48px, 15vw, 70px); }
  .app-list { grid-template-columns: 1fr; }
  .app-row:nth-child(2) { border-top: 0.5px solid var(--separator); }
  .catalog-heading { align-items: end; }
}

@media (max-width: 520px) {
  .nav-links { gap: 18px; }
  .intro-copy { font-size: 19px; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .search { width: 100%; }
  .app-row { grid-template-columns: 70px minmax(0, 1fr) auto; gap: 14px; min-height: 104px; }
  .app-row > img { width: 70px; height: 70px; }
  .app-actions > a:not(.get) { display: none; }
  .about-card { border-radius: 22px; }
  .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --text: #f5f5f7;
    --secondary: #98989d;
    --separator: rgba(255, 255, 255, 0.16);
    --fill: rgba(118, 118, 128, 0.24);
    --blue: #0a84ff;
    --header: rgba(18, 18, 18, 0.82);
    --focus: #0a84ff;
  }
  .brand-mark { background: #f5f5f7; color: #1c1c1e; }
  .text-link { color: #64a9f3; }
}

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