/* Направление A «Полка». Образцы: Rogue Amoeba, Panic, Reeder и Mela.
   Студия показывает приложения как иконки на полке; всё стоит по
   центральной оси. Одна ширина текста на всех страницах — --measure
   (800 px); ряд экранов шире (до 1136 px), но на той же оси.
   Поля: 16 px на телефоне, 32 px от 720 px. */

@font-face { font-family: "Wix Madefor Display"; src: url("/fonts/wix-madefor-display.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Wix Madefor Text"; src: url("/fonts/wix-madefor-text.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #F6F5F2;
  --surface: #FFFFFF;
  --text: #1B1B1A;
  --text2: #5E5D59;
  --line: #E2E0DA;
  --link: #1B1B1A;
  --shadow: 0 1px 2px rgba(30, 28, 20, .08), 0 10px 28px rgba(30, 28, 20, .12);
  --show-light: block; --show-dark: none;
}
[data-app="pet-diary"] { --accent: #0F766E; }

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #141414; --surface: #1E1E1D; --text: #ECEBE7; --text2: #A3A29C;
    --line: #2E2E2C; --link: #ECEBE7;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 10px 28px rgba(0, 0, 0, .45);
    --show-light: none; --show-dark: block;
  }
  :root [data-app="pet-diary"] { --accent: #2DD4BF; }
}

/* ---------- основа ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 19px/1.6 "Wix Madefor Text", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  --measure: 800px; --gutter: 16px;
}
@media (min-width: 720px) { body { --gutter: 32px; } }
h1, h2 { font-family: "Wix Madefor Display", "Wix Madefor Text", sans-serif; font-weight: 700; text-wrap: balance; margin: 0; }
p, ul, ol { margin: 0; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent, var(--text)); outline-offset: 3px; border-radius: 6px; }
img { display: block; max-width: 100%; height: auto; }
.only-light { display: var(--show-light); }
.only-dark { display: var(--show-dark); }

/* Единая ширина всех текстовых блоков: 800 px текста + поля, по центру. */
.measure { max-width: calc(var(--measure) + 2 * var(--gutter)); margin-left: auto; margin-right: auto; padding-left: var(--gutter); padding-right: var(--gutter); }
/* Ряд экранов: шире текста, та же ось. */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }

.icon { width: 100%; height: auto; border-radius: 22.5%; box-shadow: var(--shadow); }

/* ---------- шапка внутренних страниц ---------- */
.top { padding: 22px var(--gutter); text-align: center; }
.brand { font: 700 18px/1 "Wix Madefor Display", sans-serif; letter-spacing: -.01em; text-decoration: none; color: var(--text); }

/* ---------- главная ---------- */
/* Всё по центру: имя студии, фраза, полка. На полке у приложения иконка,
   под ней название, описание и «Скоро в RuStore.». Новое приложение —
   ещё одна такая карточка рядом. */
.home { text-align: center; }
.intro { padding-top: clamp(64px, 14vh, 144px); padding-bottom: clamp(48px, 8vh, 88px); }
.intro h1 { font-size: clamp(48px, 10vw, 104px); line-height: .95; letter-spacing: -.045em; }
.intro p { margin-top: 24px; font-size: clamp(20px, 2.2vw, 24px); line-height: 1.45; color: var(--text2); text-wrap: pretty; }

.shelf { padding-bottom: clamp(72px, 12vh, 128px); }
.shelf h2 { font-size: 15px; font-weight: 600; letter-spacing: .01em; color: var(--text2); padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.apps { list-style: none; padding: 40px 0 0; }
.app { display: flex; flex-direction: column; align-items: center; }
.app-icon { display: block; width: 112px; }
.app-icon .icon { transition: transform .2s ease; }
.app:hover .app-icon .icon { transform: translateY(-3px); }
.app-name { margin-top: 22px; font: 700 24px/1.25 "Wix Madefor Display", sans-serif; letter-spacing: -.01em; color: var(--text); text-decoration: none; }
.app-name:hover, .app:hover .app-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .18em; }
.app-desc { margin-top: 8px; color: var(--text2); text-wrap: pretty; }
.app-soon { margin-top: 10px; font-size: 16px; font-weight: 600; color: var(--accent); }
@media (min-width: 720px) {
  .app-icon { width: 136px; }
  .app-name { font-size: 28px; }
}

/* ---------- страница приложения ---------- */
.app-head { text-align: center; padding-top: clamp(24px, 6vh, 56px); }
.app-head .icon { width: 112px; margin: 0 auto 28px; }
.app-head h1 { font-size: clamp(34px, 6vw, 60px); line-height: 1.02; letter-spacing: -.035em; }
.lead { margin-top: 18px; font-size: clamp(20px, 2.2vw, 22px); line-height: 1.45; color: var(--text2); text-wrap: pretty; }

.screens {
  display: grid; grid-auto-flow: column; grid-auto-columns: 62%; gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-top: 48px; padding-bottom: 8px;
  scrollbar-width: none;
}
.screens::-webkit-scrollbar { display: none; }
.screens figure { margin: 0; scroll-snap-align: center; }
.shot { border-radius: 24px; border: 1px solid var(--line); background: var(--surface); }
@media (min-width: 720px) {
  .screens { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); gap: 24px; overflow: visible; padding-top: 64px; }
  .screens figure:nth-child(even) { transform: translateY(40px); }
  .shot { border-radius: 30px; }
}

/* Текст одной колонкой общей ширины, по центральной оси. */
.text { padding-top: 64px; padding-bottom: 96px; }
@media (min-width: 720px) { .text { padding-top: 120px; } }
.text p, .text ul { margin-bottom: 18px; }
.text ul { padding: 0; list-style: none; }
.text li { position: relative; padding-left: 26px; margin-bottom: 6px; }
.text li::before { content: ""; position: absolute; left: 4px; top: .68em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.text h2 { font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -.025em; line-height: 1.15; margin: 56px 0 18px; padding-top: 40px; border-top: 1px solid var(--line); }
.text > :last-child { margin-bottom: 0; }

/* ---------- документы: контакты и оферта ---------- */
/* Колонка той же ширины, по центральной оси. */
.doc { padding-top: clamp(32px, 8vh, 72px); padding-bottom: 96px; }
.doc h1 { font-size: clamp(34px, 5.4vw, 52px); line-height: 1.04; letter-spacing: -.035em; margin-bottom: 28px; }
.doc h2 { font-size: 22px; letter-spacing: -.01em; line-height: 1.3; margin: 44px 0 12px; }
.doc h3 { font-size: 19px; letter-spacing: -.005em; line-height: 1.35; margin: 28px 0 10px; }
.doc p { margin-bottom: 12px; }
.contacts p:first-of-type { font-size: 22px; }
.contacts h2 + p { padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; line-height: 1.75; font-variant-numeric: tabular-nums; }

.legal { font-size: 18px; line-height: 1.7; hyphens: auto; }
.legal h1 + p { color: var(--text2); font-size: 16px; }
.legal .pt { position: relative; padding-left: 3em; }
.legal .pt3 { padding-left: 3.8em; }
.legal .n { position: absolute; left: 0; color: var(--text2); font-variant-numeric: tabular-nums; }
.legal ul { padding-left: 4.2em; margin: 0 0 12px; }
.legal li { margin-bottom: 4px; }
.legal .req { line-height: 1.75; }
.legal table { width: 100%; border-collapse: collapse; font-size: 16px; margin-top: 8px; }
.legal th, .legal td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { font-weight: 600; color: var(--text2); font-size: 14px; }
.legal td a { word-break: break-word; }
/* Вводное слово пункта: «Реклама.», «Базовый» (бесплатный). */
.legal .lead-in { font-weight: 600; }

/* Перечень приложений в соглашении: карточка как на полке главной —
   иконка, название, адрес; ниже строки «Pro — цена: …» и «Сторонние
   сервисы: …». На телефоне строки во всю ширину карточки, с 560 px —
   под названием. */
.legal .catalog { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 16px; }
.legal .cat {
  display: grid; grid-template-columns: 48px 1fr; column-gap: 16px; align-items: center;
  padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  hyphens: manual;
}
.legal .cat .icon { width: 48px; box-shadow: 0 1px 2px rgba(30, 28, 20, .12); }
.legal .cat p { margin: 0; }
.legal .cat-title { min-width: 0; }
.legal .cat-name { font: 700 19px/1.3 "Wix Madefor Display", "Wix Madefor Text", sans-serif; letter-spacing: -.01em; text-wrap: balance; }
.legal .cat-name .n { position: static; font-weight: 600; }
.legal .cat-url { font-size: 16px; line-height: 1.5; margin-top: 2px; color: var(--text2); }
.legal .cat-row {
  grid-column: 1 / -1; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 16px; line-height: 1.6; color: var(--text2);
}
.legal .cat-row + .cat-row { margin-top: 12px; padding-top: 12px; }
.legal .cat-lbl { font-weight: 600; color: var(--text); }
.legal .cat-price { color: var(--text); }
.legal .cat-price .cat-lbl { color: var(--accent, var(--text)); }
@media (min-width: 560px) {
  .legal .cat { grid-template-columns: 64px 1fr; column-gap: 20px; padding: 24px; }
  .legal .cat .icon { width: 64px; }
  .legal .cat-name { font-size: 21px; }
  .legal .cat-row { grid-column: 2; }
}

/* ---------- подвал ---------- */
.foot { border-top: 1px solid var(--line); padding: 36px 0 96px; font-size: 15px; line-height: 1.6; color: var(--text2); text-align: center; }
.foot .wrap { max-width: calc(var(--measure) + 2 * var(--gutter)); }
.foot a { color: var(--text2); }
.foot a:hover { color: var(--text); }
.foot p + p { margin-top: 6px; }
.foot-links { color: var(--text); }
.foot-links a { color: var(--text); text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
