/* /mobile catalog in the home-page style (markarov.dev/index.html, scripts/build-home.py):
   headings stay promo.css Space Grotesk at its sizes, Cormorant Garamond italic accents,
   JetBrains Mono labels, the amber studio mark.
   Loaded after promo.css by the catalog only; app pages keep promo.css v7 as it is. */

body.catalog {
  --serif: "Cormorant Garamond", "Cormorant Garamond Fallback", Georgia, serif;
  --mono: "JetBrains Mono", "JetBrains Mono Fallback", ui-monospace, SFMono-Regular, Menlo, monospace;
  --studio: #f0b264;
  --studio-ink: #1a1206;
  --bg: #05070d;
}
:root[data-theme="light"] body.catalog { --studio: #a8641a; --studio-ink: #ffffff; --bg: #f7f7f4; }

.catalog em { font-family: var(--serif); font-style: italic; font-weight: 500; color: var(--studio); letter-spacing: 0; }

/* the bar: same wordmark, sections, language and theme as the home page */
.catalog .bar-brand { font: 700 18px/1 var(--display); letter-spacing: -.02em; color: var(--ink); }
.catalog .bar-brand span { color: var(--studio); font-weight: 700; }
.catalog .bar-tools { gap: 20px; }
.catalog .bar-nav { display: flex; gap: 22px; font-size: 14px; }
.catalog .bar-nav a { color: var(--ink-2); text-decoration: none; }
.catalog .bar-nav a:hover, .catalog .bar-nav a[aria-current] { color: var(--ink); }
.catalog .seg button { font: 500 11px/1 var(--mono); letter-spacing: .08em; }
.catalog .seg button[aria-pressed="true"],
:root[data-theme="light"] .catalog .seg button[aria-pressed="true"] { background: var(--studio); color: var(--studio-ink); box-shadow: none; }
.catalog .theme-btn { border: 1px solid var(--line); border-radius: 50%; width: 34px; height: 34px; }
@media (max-width: 860px) { .catalog .bar-nav { display: none; } .catalog .bar-tools { gap: 10px; } }

/* hero */
.catalog .cat-hero { padding: 56px 0 8px; max-width: none; display: grid; gap: 32px; }
.catalog .cat-hero-main { max-width: 640px; }
.catalog .foot-links a.wordmark { color: var(--ink); text-decoration: none; }
.catalog .foot-links a.wordmark:hover { color: var(--ink); text-decoration: none; }
.wordmark { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.catalog .wordmark span { color: var(--studio); font-weight: 700; }
.catalog .cat-hero h1 { margin: 0 0 18px; }
.catalog .cat-hero h1 em { font-size: 1.1em; line-height: .9; white-space: nowrap; }
.catalog .chip { font: 500 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }

/* category quick-jump directory on the right of hero */
.catalog .cat-dirs { display: grid; gap: 10px; align-self: end; }
.catalog .cat-dir {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 13px 16px; border-radius: 18px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.catalog .cat-dir:hover {
  border-color: color-mix(in oklab, var(--studio) 45%, var(--line));
  background: var(--surface-2); transform: translateY(-1px);
}
.catalog .cat-dir-icos { display: flex; align-items: center; }
.catalog .cat-dir-icos img {
  width: 30px; height: 30px; border-radius: 8px;
  box-shadow: 0 0 0 2px var(--bg);
}
.catalog .cat-dir-icos img + img { margin-left: -7px; }
.catalog .cat-dir-txt { display: grid; gap: 2px; min-width: 0; }
.catalog .cat-dir-txt b { font: 600 15px/1.2 var(--display); letter-spacing: -.01em; color: var(--ink); }
.catalog .cat-dir-txt span { font-size: 13px; line-height: 1.3; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.catalog .cat-dir-n {
  font: 500 11px/1 var(--mono); letter-spacing: .06em; color: var(--studio);
  padding: 6px 10px; border-radius: 999px;
  background: color-mix(in oklab, var(--studio) 12%, transparent);
  border: 1px solid color-mix(in oklab, var(--studio) 28%, transparent);
  white-space: nowrap;
}
@media (min-width: 980px) {
  .catalog .cat-hero { grid-template-columns: minmax(0, 1.22fr) minmax(0, .78fr); gap: 48px; align-items: end; }
}

/* section heads: promo.css Space Grotesk, a little more air above */
.catalog .group { padding-top: 72px; }

.catalog .group-head p { font-size: 15px; }

/* cards: tinted by their own accent, mono eyebrows, subtle arrow cue */
.catalog .tile, .catalog .app-card { border-color: color-mix(in oklab, var(--accent) 22%, var(--line)); }
.catalog .tile { border-radius: 26px; }
.catalog .app-card { border-radius: 22px; }
.catalog .tile .eyebrow { font-size: 10.5px; letter-spacing: .16em; }
.catalog .tile::after, .catalog .app-card::after {
  content: "→"; position: absolute; top: 22px; right: 22px; z-index: 2;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; pointer-events: none;
  font: 500 13px/1 var(--mono); color: var(--ink-3);
  border: 1px solid var(--line); background: color-mix(in oklab, var(--surface) 80%, transparent);
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}
.catalog .tile:hover::after, .catalog .app-card:hover::after {
  color: var(--accent-ink);
  border-color: color-mix(in oklab, var(--accent) 50%, var(--line));
  background: var(--accent-soft);
  transform: translateX(2px);
}
@media (max-width: 699px) {
  .catalog .app-card h3 { padding-right: 34px; }
}

/* small store badges beside the privacy link */
.catalog .foot-stores { display: inline-flex; align-items: center; gap: 8px; }
.catalog .foot-stores .badge img { height: 22px; width: auto; border-radius: 4px; }
.catalog .foot-links .foot-stores a:hover { text-decoration: none; }

.catalog .foot .ids { font-family: var(--mono); font-size: 12px; }
.catalog .foot p > a { color: inherit; text-decoration: underline; text-decoration-style: dotted; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.catalog .foot p > a:hover { color: var(--ink); text-decoration-color: currentColor; }
