/* Сайт parampam.net 1.0 — W20, W11, W12 (design/ch10, чекпоинт 10а, решение № 97).
   Значения — из инлайн-стилей «Ч10 Сайт.dc.html» и таблиц design/ch10/README.md.
   Ширины макета: компьютер 1440, планшет 820, телефон 390. Здесь: телефон до 599 px,
   планшет 600–1099, компьютер от 1100. Пути к шрифтам build.mjs заменяет на адреса с хешем. */

@font-face {
  font-family: "Alegreya";
  src: url("/assets/alegreya-600.700a4c10dd.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya Sans";
  src: url("/assets/alegreya-sans-400.9e5b3a9fe7.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya Sans";
  src: url("/assets/alegreya-sans-500.d47da402dd.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
/* У Alegreya Sans нет начертания 600: макет просит 600, браузер берёт Bold. Диапазон делает это явным. */
@font-face {
  font-family: "Alegreya Sans";
  src: url("/assets/alegreya-sans-700.c4765e75d7.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --bg: #F7F0E6;
  --surface: #FFFBF5;
  --line: #E3D5C3;
  --stroke: #9A8672;
  --ink: #2B1F1A;
  --ink2: #6F5F55;
  --accent: #7B2433;
  --terra: #A9502F;
  --mark-arc: #7B2433;
  --glow-a: rgba(169, 80, 47, .14);
  --glow-b: rgba(201, 113, 75, .18);

  /* компьютер 1440 */
  --pad-x: 80px;
  --head-h: 88px;
  --lk-w: 30px;
  --lk-h: 18px;
  --lk-fs: 28px;
  --lk-gap: 9px;
  --h1: 64px;
  --h1-lh: 68px;
  --lead: 20px;
  --lead-lh: 30px;
  --gap-a: 24px;
  --gap-b: 40px;
  --align: center;
  --talign: center;
  --ph-s: 1;
  --ph-w: 342px;
  --ph-vis: 719px;
  --ph-mb: 40px;
  --foot-dir: row;
  --foot-align: center;
  --foot-gap: 10px 28px;
  --foot-pad: 22px 0 26px;
  --op-ml: auto;
  --doc-top: 40px;
  --doc-bottom: 64px;
  --dh1: 48px;
  --dh1-lh: 52px;
  --dh2: 26px;
  --dh2-lh: 30px;
  --dbody: 18px;
  --dbody-lh: 28px;
  --nf-mark-w: 84px;
  --nf-mark-h: 50px;
  --nf-h: 44px;
  --nf-h2: 28px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15110E;
    --surface: #261E19;
    --line: #45382E;
    --stroke: #7D6B5D;
    --ink: #F4EADC;
    --ink2: #BFAE9E;
    --accent: #D97A8A;
    --terra: #E3906C;
    --mark-arc: #F4EADC;
    --glow-a: rgba(227, 144, 108, .10);
    --glow-b: rgba(201, 113, 75, .12);
  }
}

/* планшет 820 */
@media (max-width: 1099px) {
  :root {
    --pad-x: 56px;
    --head-h: 84px;
    --h1: 52px;
    --h1-lh: 56px;
    --lead: 19px;
    --lead-lh: 28px;
    --gap-b: 44px;
    --foot-dir: column;
    --foot-align: flex-start;
    --op-ml: 0;
    --foot-gap: 12px;
    --foot-pad: 22px 0 30px;
    --dh1: 44px;
    --dh1-lh: 48px;
  }
}

/* телефон 390 */
@media (max-width: 599px) {
  :root {
    --pad-x: 20px;
    --head-h: 64px;
    --lk-w: 24px;
    --lk-h: 14px;
    --lk-fs: 23px;
    --lk-gap: 7px;
    --h1: 40px;
    --h1-lh: 42px;
    --lead: 17px;
    --lead-lh: 25px;
    --gap-a: 16px;
    --gap-b: 32px;
    --align: flex-start;
    --talign: left;
    --ph-s: .78;
    --ph-w: 267px;
    --ph-vis: 561px;
    --ph-mb: 35px;
    --foot-pad: 20px 0 28px;
    --doc-top: 16px;
    --doc-bottom: 48px;
    --dh1: 34px;
    --dh1-lh: 38px;
    --dh2: 22px;
    --dh2-lh: 26px;
    --dbody: 17px;
    --dbody-lh: 26px;
    --nf-mark-w: 66px;
    --nf-mark-h: 39px;
    --nf-h: 32px;
    --nf-h2: 24px;
  }
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(60% 55% at 100% 0%, var(--glow-a), transparent 70%),
    radial-gradient(90% 45% at 30% 105%, var(--glow-b), transparent 70%),
    var(--bg);
  color: var(--ink);
  font-family: "Alegreya Sans", -apple-system, system-ui, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.serif {
  font-family: "Alegreya", Georgia, serif;
  font-weight: 600;
}

/* Цифры рядом с прописными (№ 137): «152-ФЗ», «iPhone 16» — высоты прописных, у номеров и реквизитов
   («ОГРНИП 3…») ещё и одной ширины. Обёртку ставит build.mjs (`capsNumbers`), остальные цифры — как в шрифте. */
.lnum { font-variant-numeric: lining-nums; }
.lnum.tnum { font-variant-numeric: lining-nums tabular-nums; }

/* общая ширина: на экранах шире 1440 содержимое не расползается */
.site-head,
.home,
.doc,
.site-foot {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
}

/* шапка */
.site-head {
  flex: none;
  height: var(--head-h);
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: var(--lk-gap);
  color: var(--ink);
  text-decoration: none;
}

.mark { display: block; flex: none; }
.mark .arc { fill: var(--mark-arc); }
.mark .dot { fill: var(--terra); }
.brand .mark { width: var(--lk-w); height: var(--lk-h); }

.brand-name {
  font-family: "Alegreya", Georgia, serif;
  font-weight: 600;
  font-size: var(--lk-fs);
  line-height: 1;
  letter-spacing: -.2px;
}

.lang {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 17px;
  line-height: 22px;
  font-weight: 500;
  color: var(--ink2);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 5px;
}

.lang:hover { text-decoration-color: currentColor; }

/* W20 · главная */
.home {
  flex: 1 1 auto;
  padding: 8px var(--pad-x) 0;
  display: flex;
  flex-direction: column;
  align-items: var(--align);
  text-align: var(--talign);
}

.promise {
  margin: 0;
  max-width: 900px;
  font-family: "Alegreya", Georgia, serif;
  font-weight: 600;
  font-size: var(--h1);
  line-height: var(--h1-lh);
  letter-spacing: -.6px;
  text-wrap: balance;
}

.about {
  margin: var(--gap-a) 0 0;
  max-width: 620px;
  font-size: var(--lead);
  line-height: var(--lead-lh);
  color: var(--ink2);
  text-wrap: pretty;
}

.facts {
  margin: var(--gap-a) 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: var(--align);
}

.facts li {
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 15px;
  line-height: 20px;
  font-weight: 500;
}

/* Значок App Store — официальный файл Apple без изменений; поле вокруг — не меньше четверти его высоты (правила Apple). */
.store-badge {
  margin: var(--gap-a) 0 0;
  display: block;
  width: max-content;
  border-radius: 7px;
}

.store-badge img {
  display: block;
  width: auto;
  height: 44px;
}

.home-text {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: var(--align);
}

.home-phone { align-self: center; }

/* Телефон на главной: рамка рисуется кодом, экран — картинка из design/ch10/export. */
.phone-slot {
  margin: var(--gap-b) 0 var(--ph-mb);
  align-self: center;
  flex: none;
  width: var(--ph-w);
  height: var(--ph-vis);
  overflow: hidden;
  position: relative;
}

.phone {
  width: 342px;
  height: 719px;
  padding: 10px;
  border-radius: 56px;
  background: #1B1512;
  box-shadow: 0 30px 80px rgba(60, 30, 15, .28), inset 0 0 0 1.5px rgba(255, 255, 255, .08);
  transform: scale(var(--ph-s));
  transform-origin: 0 0;
}

.phone-screen {
  width: 322px;
  height: 699px;
  overflow: hidden;
  border-radius: 46px;
}

.phone-screen img {
  display: block;
  width: 322px;
  height: 699px;
}

/* компьютер, вариант 1a: текст слева, телефон справа, один экран */
@media (min-width: 1100px) {
  .home {
    padding: 0 var(--pad-x);
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 64px;
    align-items: center;
    text-align: left;
  }

  .home-text { align-items: flex-start; }

  .about {
    margin-top: 28px;
    max-width: 540px;
  }

  .facts {
    margin-top: 28px;
    gap: 10px;
    justify-content: flex-start;
  }

  .facts li {
    padding: 8px 14px;
    font-size: 16px;
    line-height: 20px;
  }

  .store-badge { margin-top: 28px; }

  .home-phone {
    display: flex;
    justify-content: center;
  }

  .phone-slot {
    margin: 0;
    width: 342px;
    height: 719px;
    overflow: visible;
  }
}

/* Невысокие экраны компьютеров (1366 × 768 и ниже): телефон уменьшается, чтобы главная осталась одним экраном. */
@media (min-width: 1100px) and (max-height: 860px) {
  .phone-slot { width: 290px; height: 610px; }
  .phone { transform: scale(.848); }
}

/* W11 · документ */
.doc {
  flex: 1 0 auto;
  padding: var(--doc-top) var(--pad-x) var(--doc-bottom);
  display: flex;
  justify-content: center;
}

.doc article {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
}

.eyebrow {
  font-size: 13px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-variant-numeric: lining-nums;
  color: var(--terra);
}

.doc h1 {
  margin: 10px 0 0;
  font-family: "Alegreya", Georgia, serif;
  font-weight: 600;
  font-size: var(--dh1);
  line-height: var(--dh1-lh);
  letter-spacing: -.4px;
  text-wrap: balance;
}

.doc-meta {
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 22px;
  color: var(--ink2);
}

.doc-note {
  margin: 24px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px dashed var(--stroke);
  font-size: 14px;
  line-height: 19px;
  color: var(--ink2);
}

.doc-body h2 {
  margin: 36px 0 0;
  font-family: "Alegreya", Georgia, serif;
  font-weight: 600;
  font-size: var(--dh2);
  line-height: var(--dh2-lh);
}

.doc-body p {
  margin: 14px 0 0;
  font-size: var(--dbody);
  line-height: var(--dbody-lh);
  text-wrap: pretty;
}

.doc-body ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-body li {
  margin-top: 10px;
  display: flex;
  gap: 14px;
  font-size: var(--dbody);
  line-height: var(--dbody-lh);
}

.doc-body li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 11px;
  border-radius: 50%;
  background: var(--terra);
}

.doc-body li span {
  flex: 1;
  min-width: 0;
  text-wrap: pretty;
}

.doc-body a {
  color: var(--accent);
  text-underline-offset: 4px;
}

.other-doc {
  margin: 40px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 17px;
  line-height: 24px;
}

.other-doc a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* 1.1: «Другие документы:» и три ссылки столбцом (мини-чекпоинт «Экраны 1.1», блок 6) */
.other-docs {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

/* W12 · 404 */
.nf {
  flex: 1 1 auto;
  padding: 40px var(--pad-x);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.nf .mark { width: var(--nf-mark-w); height: var(--nf-mark-h); }

.nf h1 {
  margin: 28px 0 0;
  font-family: "Alegreya", Georgia, serif;
  font-weight: 600;
  font-size: var(--nf-h);
  line-height: 1.1;
  letter-spacing: -.3px;
}

.nf p {
  margin: 10px 0 0;
  font-size: 18px;
  line-height: 26px;
  color: var(--ink2);
}

.nf-link {
  margin-top: 20px;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.nf-rule {
  margin: 28px 0;
  width: 48px;
  height: 1px;
  background: var(--line);
}

.nf h2 {
  margin: 0;
  font-family: "Alegreya", Georgia, serif;
  font-weight: 600;
  font-size: var(--nf-h2);
  line-height: 1.15;
}

.nf .nf-en p {
  margin-top: 8px;
  font-size: 17px;
  line-height: 24px;
}

.nf .nf-en .nf-link {
  margin-top: 14px;
  font-size: 17px;
}

.nf-en {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* подвал */
.site-foot {
  flex: none;
  width: auto;
  max-width: calc(1440px - 2 * var(--pad-x));
  margin: 0 var(--pad-x);
  padding: var(--foot-pad);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: var(--foot-dir);
  flex-wrap: wrap;
  gap: var(--foot-gap);
  align-items: var(--foot-align);
  font-size: 15px;
  line-height: 20px;
  color: var(--ink2);
}

@media (min-width: 1600px) {
  .site-foot { margin-inline: auto; width: calc(1440px - 2 * var(--pad-x)); }
}

.site-foot .mail {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.site-foot .mail:hover { text-decoration: underline; text-underline-offset: 4px; }

.site-foot .docs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.site-foot .docs a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
}

.site-foot .docs a:hover { text-decoration-color: currentColor; }

/* 1.1: четыре документа в два столбца между поддержкой и ИП (6 «б»), на телефоне — столбцом */
.site-foot .docs-grid {
  display: grid;
  grid-template-columns: auto auto;
  justify-items: start;
  gap: 6px 24px;
}

@media (max-width: 599px) {
  .site-foot .docs-grid { grid-template-columns: auto; gap: 8px; }
}

.site-foot .op { margin-left: var(--op-ml); }
