/* SEO/app landing pages (layout: seo). Tokens — shared/design/tokens.json (indie design rules, MIC-24).
   No frameworks, no external fonts, no scripts. Light/dark via prefers-color-scheme. */

:root {
  --bg: #ffffff;
  --surface: #f2f2f7;
  --surface-2: #e9e9ee;
  --line: #e5e5ea;
  --text: #000000;
  --text-2: #6c6c70;
  --accent: #0066cc;
  --accent-hover: #0055ab;
  --accent-tint: #e8f0fb;
  --on-accent: #ffffff;
  --shadow: 0 10px 30px rgba(0, 0, 0, .10), 0 2px 6px rgba(0, 0, 0, .06);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, .08);
  --bar-bg: rgba(255, 255, 255, .82);
  --r-s: 8px;  --r-m: 12px;  --r-l: 16px;  --r-xl: 28px;
  --sp-xxs: 4px; --sp-xs: 8px; --sp-s: 12px; --sp-m: 16px; --sp-l: 24px; --sp-xl: 32px;
  --edge: 16px;
  --measure: 680px;
  --wide: 1080px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --line: #2c2c2e;
    --text: #ffffff;
    --text-2: #aeaeb2;
    --accent: #0a84ff;
    --accent-hover: #3d9cff;
    --accent-tint: #0d1e33;
    --on-accent: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .06);
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .06);
    --bar-bg: rgba(0, 0, 0, .78);
  }
}
@media (min-width: 600px) { :root { --edge: 24px; } }
@media (min-width: 900px) { :root { --edge: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Inter, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: var(--r-s); }

.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding-left: var(--edge); padding-right: var(--edge); }

/* ---------- header ---------- */
.site-bar {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-bar { background: var(--bar-bg); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
}
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-s); min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: var(--text); font-weight: 600; font-size: 17px; letter-spacing: -.01em; min-height: 44px; }
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-icon { width: 32px; height: 32px; border-radius: 8px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.bar-actions { display: flex; align-items: center; gap: var(--sp-xs); }
.lang {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font-size: 13px; font-weight: 600; letter-spacing: .02em; white-space: nowrap;
}
.lang:hover { text-decoration: none; background: var(--surface-2); }
.lang svg { width: 16px; height: 16px; flex: none; }
.lang-full { display: none; }
@media (min-width: 720px) { .lang-short { display: none; } .lang-full { display: inline; } }

/* official App Store badge, light/dark via <picture> */
.badge { display: inline-flex; line-height: 0; border-radius: 7px; }
.badge img { width: 120px; height: 40px; }
.badge:hover { opacity: .9; }
.bar-actions .badge img { width: 108px; height: 36px; }
@media (min-width: 420px) { .bar-actions .badge img { width: 120px; height: 40px; } }
/* 360–419: бренд 15 px, иконка 28, пилюля языка без глобуса — иначе бренд налезает на пилюлю (ревью MIC-24 п.1) */
@media (max-width: 419px) {
  .bar-in { gap: var(--sp-xs); }
  .brand { font-size: 15px; gap: 8px; }
  .brand-icon { width: 28px; height: 28px; border-radius: 7px; }
  .lang svg { display: none; }
  .lang { padding: 0 10px; }
}

/* ---------- page ---------- */
.seo-page { padding-bottom: var(--sp-xl); overflow-wrap: anywhere; }
/* desktop: one left edge — prose column starts at the hero/strip x, not centered separately */
.seo-page > * { max-width: var(--measure); margin-left: 0; margin-right: auto; }
.seo-page > .hero, .seo-page > .shots, .seo-page > .cta-band { max-width: none; }

/* ---------- hero ---------- */
.hero { display: grid; gap: var(--sp-l); padding: var(--sp-l) 0 var(--sp-m); align-items: center; }
.seo-page > .hero + h2 { margin-top: var(--sp-xl); }
.hero-copy > * { max-width: var(--measure); }
.hero h1 {
  margin: 0 0 var(--sp-m);
  font-size: clamp(2rem, 1.2rem + 3.4vw, 3.5rem);
  line-height: 1.08; letter-spacing: -.025em; font-weight: 800;
}
.hero-copy p { font-size: 1.125rem; line-height: 1.55; color: var(--text-2); margin: 0 0 var(--sp-l); }
.hero-copy p:has(> .cta) { margin-bottom: 0; }
.hero-art { margin: 0; justify-self: center; width: 100%; max-width: 260px; }
.hero-art img { width: 100%; border-radius: var(--r-xl); box-shadow: var(--shadow); }
@media (min-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; padding: 40px 0 40px; }
  .hero-copy p { font-size: 1.25rem; }
  .hero-art { max-width: 280px; }
}
.hero-article { grid-template-columns: 1fr; padding-bottom: var(--sp-s); }
.hero-article .hero-copy, .hero-article .app-card { width: 100%; max-width: var(--measure); margin-left: 0; margin-right: auto; }
.hero-article h1 { font-size: clamp(1.9rem, 1.2rem + 3vw, 2.75rem); }

/* app card (article hero) */
.app-card {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-m);
  max-width: var(--measure); margin: var(--sp-xs) 0 0;
  padding: var(--sp-m); border-radius: var(--r-l);
  background: var(--surface); border: 1px solid var(--line);
}
.app-card-icon { width: 56px; height: 56px; border-radius: 13px; flex: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.app-card-text { flex: 1 1 140px; min-width: 0; display: flex; flex-direction: column; }
.app-card-name { font-weight: 600; font-size: 1rem; line-height: 1.3; color: var(--text); }
.app-card-sub { font-size: .875rem; color: var(--text-2); white-space: nowrap; }
.app-card a.cta.cta-card { flex: 0 0 auto; padding: 12px 22px; font-size: 16px; }
@media (max-width: 479px) { .app-card a.cta.cta-card { flex-basis: 100%; width: 100%; } }
.seo-page > .app-card { margin: 40px auto var(--sp-xl) 0; }
.seo-page > .app-card + h2 { margin-top: var(--sp-l); }

/* ---------- primary buttons (markdown links with .cta) ---------- */
a.cta, a.cta:visited {
  display: inline-block; box-sizing: border-box;
  padding: 16px 28px; border-radius: var(--r-l);
  background: var(--accent); color: var(--on-accent);
  font-weight: 600; font-size: 17px; line-height: 1.35; text-align: center;
  box-shadow: 0 6px 18px rgba(0, 102, 204, .28);
  transition: background .15s ease, transform .15s ease;
}
a.cta:hover { background: var(--accent-hover); text-decoration: none; transform: translateY(-1px); }
a.cta:active { transform: translateY(0); }
a.cta::before {
  content: ""; display: inline-block; width: 20px; height: 20px; vertical-align: -4px; margin-right: 10px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 4v11'/><path d='m7 10 5 5 5-5'/><path d='M5 20h14'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 4v11'/><path d='m7 10 5 5 5-5'/><path d='M5 20h14'/></svg>") center / contain no-repeat;
}
a.cta { text-wrap: balance; }
@media (max-width: 479px) { .hero a.cta, .cta-band a.cta { display: block; width: 100%; } a.cta { font-size: 16px; padding: 15px 18px; } }

/* ---------- prose ---------- */
.seo-page h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); line-height: 1.2; letter-spacing: -.02em; font-weight: 700;
  margin: 48px auto var(--sp-m) 0;
}
@media (min-width: 760px) { .seo-page h2 { margin-top: 56px; } }
.seo-page h2 + p, .seo-page h2 + ul, .seo-page h2 + ol { margin-top: 0; }
.seo-page p { margin: 0 auto var(--sp-m) 0; }
.seo-page ul, .seo-page ol { margin: 0 auto var(--sp-l) 0; padding-left: 0; }
.seo-page ul { list-style: none; }
.seo-page ul > li { position: relative; padding-left: 26px; margin-bottom: var(--sp-xs); }
.seo-page ul > li::before { content: ""; position: absolute; left: 6px; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.seo-page ol { list-style: none; counter-reset: step; }
.seo-page ol > li { counter-increment: step; position: relative; padding-left: 44px; margin-bottom: var(--sp-s); }
.seo-page ol > li::before {
  content: counter(step); position: absolute; left: 0; top: .1em;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-tint); color: var(--accent);
  font-weight: 700; font-size: 15px; line-height: 30px; text-align: center;
}
.seo-page li > p { margin: 0; }
.seo-page strong { font-weight: 600; }
/* FAQ: «**Question?** Answer» → question on its own line */
.seo-page p > strong:first-child { display: block; font-size: 1.0625rem; margin-bottom: 2px; }
.seo-page p > strong:first-child + br { display: none; }

/* ---------- screenshots gallery ---------- */
.shots {
  display: flex; gap: var(--sp-s);
  margin: var(--sp-l) calc(-1 * var(--edge)) var(--sp-xl);
  padding: var(--sp-xs) var(--edge) var(--sp-m);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--edge); -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.shots::-webkit-scrollbar { display: none; }
.shot { flex: 0 0 min(64vw, 240px); margin: 0; scroll-snap-align: start; }
.shot img { width: 100%; border-radius: var(--r-l); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.shots.shots-1 { justify-content: center; }
@media (min-width: 760px) {
  .shots, .shots.shots-1 { flex-wrap: wrap; justify-content: flex-start; gap: var(--sp-l); margin: var(--sp-xl) auto 48px; padding: 0; overflow: visible; scroll-snap-type: none; }
  .shot { flex: 0 1 236px; }
  .shots.shots-2 .shot { flex-basis: 260px; }
}

/* ---------- bottom CTA band ---------- */
.cta-band {
  margin: 64px auto var(--sp-l);
  padding: 36px var(--sp-m);
  border-radius: var(--r-xl);
  background: var(--surface);
  text-align: center;
}
.band-head { display: flex; flex-direction: column; align-items: center; margin-bottom: var(--sp-l); }
.cta-band-icon { width: 76px; height: 76px; border-radius: 17px; margin: 0 0 var(--sp-s); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.band-name { font-weight: 700; font-size: 1.25rem; letter-spacing: -.01em; }
.band-sub { color: var(--text-2); font-size: .9375rem; }
.cta-band p { margin: 0 auto; max-width: 560px; }
.cta-band p:has(> .cta) { margin-bottom: var(--sp-m); }
.cta-band p:not(:has(> .cta)) { color: var(--text-2); font-size: 1rem; }
.cta-band p:not(:has(> .cta)) + p { margin-top: var(--sp-xs); }
.cta-band p:has(> .cta) { margin-top: 0; }
.cta-band a.cta { max-width: 100%; }
@media (min-width: 600px) { .cta-band { padding: 44px var(--sp-xl); } }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: var(--sp-l) 0 40px; color: var(--text-2); font-size: .875rem; }
.foot-in { display: flex; flex-wrap: wrap; gap: var(--sp-xs) var(--sp-l); align-items: center; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 var(--sp-m); margin: 0; padding: 0; list-style: none; }
.foot-links a { color: var(--text-2); min-height: 36px; display: inline-flex; align-items: center; }
.foot-links a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  a.cta { transition: none; }
}
