/* ============================================================
   MirrorMirage — общий стиль сайта
   Все страницы подключают этот один файл.
   Хотите поменять цвет сайта — меняйте значения в блоке :root.
   ============================================================ */

/* ---------- Шрифты (свои файлы, без Google Fonts) ----------
   Заголовки — Unbounded, текст — Manrope. Лицензия: fonts/OFL.txt */
@font-face {
  font-family: "Unbounded"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/unbounded-cyrillic-500-normal.woff2") format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "Unbounded"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/unbounded-cyrillic-700-normal.woff2") format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "Unbounded"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/unbounded-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Unbounded"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/unbounded-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/manrope-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/manrope-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/manrope-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/manrope-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  --bg: #050a1c;            /* самый тёмный синий — основа фона */
  --bg-2: #0a1233;          /* чуть светлее, для карточек */
  --blue: #2f6bff;          /* основной синий */
  --cyan: #38d6ff;          /* яркий голубой для свечения */
  --text: #e8eeff;          /* основной цвет текста */
  --muted: #9aa8d4;         /* приглушённый текст */
  --line: rgba(120, 160, 255, 0.22);   /* тонкие рамки */
  --glass: rgba(10, 18, 51, 0.62);     /* «матовое стекло» карточек */
  --legal: #56628c;         /* приглушённые реквизиты в подвале (контраст ≈3.2:1 к --bg) */
  --facet: rgba(150, 215, 255, 0.6);   /* светлая грань кристаллов */
  --font-head: "Unbounded", "Segoe UI", Roboto, system-ui, sans-serif;
  --font-body: "Manrope", "Segoe UI", Roboto, system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  /* Фоновая картинка страницы задаётся классом на <body> */
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
/* Тёмная вуаль поверх картинки, чтобы текст читался */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(5,10,28,.72) 0%, rgba(5,10,28,.88) 100%);
}
body.bg-portal  { background-image: url("images/bg-portal.jpg"); }
body.bg-citadel { background-image: url("images/bg-citadel.jpg"); }

button, input, select, textarea { font-family: inherit; }

/* Заголовки — Unbounded (он широкий, поэтому размеры и разрядка скромнее) */
h1, h2, h3, .brand span, .hero-title { font-family: var(--font-head); font-weight: 500; overflow-wrap: break-word; }
h1, .hero-title, .brand span { font-weight: 700; }
b, strong, summary, .btn { font-weight: 600; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: min(1100px, 92%); margin: 0 auto; }

/* ---------- Шапка ---------- */
header.site {
  position: sticky; top: 0; z-index: 10;
  background: rgba(5, 10, 28, .6);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
header.site .container {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; gap: 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 18px rgba(56,214,255,.45); animation: logo-glow 4s ease-in-out infinite; }
@keyframes logo-glow {
  0%, 100% { box-shadow: 0 0 18px rgba(56,214,255,.4); }
  50%      { box-shadow: 0 0 28px rgba(56,214,255,.75); }
}
.brand span { letter-spacing: .1em; font-size: .92rem; }

/* Кнопка-бургер: видна только на телефоне и только если работает скрипт (см. @media внизу) */
.menu-toggle {
  display: none; position: relative; width: 44px; height: 44px; flex: none;
  border: 1px solid var(--line); border-radius: 12px; background: rgba(47,107,255,.12); cursor: pointer;
}
.menu-toggle:hover { border-color: var(--cyan); }
.menu-toggle:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  position: absolute; height: 2px; border-radius: 2px; background: var(--text);
  transition: transform .25s, top .25s, background .2s;
}
.menu-toggle span { left: 11px; right: 11px; top: 20px; }
.menu-toggle span::before, .menu-toggle span::after { content: ""; left: 0; right: 0; }
.menu-toggle span::before { top: -7px; }
.menu-toggle span::after  { top: 7px; }
header.site.open .menu-toggle span { background: transparent; }
header.site.open .menu-toggle span::before { top: 0; transform: rotate(45deg); }
header.site.open .menu-toggle span::after  { top: 0; transform: rotate(-45deg); }

nav ul { list-style: none; display: flex; gap: 6px; flex-wrap: wrap; }
nav a {
  position: relative; display: block; padding: 8px 14px; border-radius: 999px;
  color: var(--muted); font-size: .95rem; transition: .2s;
}
nav a:hover { color: var(--text); background: rgba(47,107,255,.18); text-decoration: none; }
nav a.active { color: #fff; background: none; }
/* Грань под активным пунктом: линия 1px с ромбом посередине */
nav a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}
nav a.active::before {
  content: ""; position: absolute; left: 50%; bottom: .5px; width: 6px; height: 6px; margin-left: -3px;
  background: var(--cyan); transform: rotate(45deg); box-shadow: 0 0 8px var(--cyan);
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-block; padding: 13px 28px;
  font-weight: 600; border: 1px solid transparent; cursor: pointer;
  background: linear-gradient(135deg, var(--blue), var(--cyan)); background-origin: border-box;
  color: #031028; transition: transform .25s, filter .25s; font-size: 1rem;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.1); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--text); }

/* ---------- Главный экран ---------- */
.hero { text-align: center; padding: 110px 0 90px; }
.hero img.big-icon {
  width: 150px; height: 150px; border-radius: 50%;
  box-shadow: 0 0 50px rgba(56,214,255,.55);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-12px); } }
.hero h1 {
  font-size: clamp(1.8rem, 5vw, 3.2rem); margin: 28px 0 14px;
  letter-spacing: .04em;
  background: linear-gradient(90deg, #fff, var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { max-width: 640px; margin: 0 auto 34px; color: var(--muted); font-size: 1.15rem; }
.hero .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Заголовок страницы ---------- */
.page-title { text-align: center; padding: 70px 0 30px; }
.page-title h1 {
  font-size: clamp(1.5rem, 4vw, 2.3rem); letter-spacing: .03em; line-height: 1.25;
  background: linear-gradient(90deg, #fff, var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-title p { color: var(--muted); max-width: 620px; margin: 12px auto 0; }

/* ---------- Секции и карточки ---------- */
section.block { padding: 40px 0; }
section.block > .container > h2 { margin-bottom: 22px; font-size: 1.35rem; }

.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  padding: 26px; transition: transform .25s, background-color .25s;
}
.card:hover { transform: translateY(-3px); }
.card h3 { margin-bottom: 8px; font-size: 1.05rem; }
.card p { color: var(--muted); margin-bottom: 14px; }
.card .tag {
  display: inline-block; font-size: .78rem; padding: 3px 10px; border-radius: 999px;
  background: rgba(56,214,255,.14); color: var(--cyan); margin-bottom: 12px;
}
.card .price { font-size: 1.1rem; font-weight: 700; color: #fff; margin: 4px 0 16px; }
.card .placeholder-shot {
  height: 140px; border-radius: 12px; margin-bottom: 16px;
  border: 1px dashed var(--line); display: grid; place-items: center;
  color: var(--muted); font-size: .85rem;
  background: repeating-linear-gradient(45deg, rgba(47,107,255,.06) 0 10px, transparent 10px 20px);
}

.steps { counter-reset: step; list-style: none; display: grid; gap: 16px; }
.steps li {
  counter-increment: step; padding: 18px 20px 18px 66px;
}
.steps li::before {
  content: counter(step); position: absolute; left: 17px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; display: grid; place-items: center; font-size: .95rem;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);   /* номер в ромбе-кристалле */
  background: linear-gradient(135deg, var(--blue), var(--cyan)); color: #031028; font-weight: 700;
}

.note {
  border-left: 3px solid var(--cyan); background: rgba(56,214,255,.08);
  padding: 14px 18px; border-radius: 0 12px 12px 0; color: var(--muted); margin-top: 22px;
}

/* ---------- Подвал ---------- */
footer.site {
  position: relative; margin-top: 70px; padding: 34px 0;
  background: rgba(5, 10, 28, .75); color: var(--muted); font-size: .92rem;
}
/* Сверху подвала: тонкая светящаяся линия с ромбом-кристаллом по центру */
footer.site::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}
footer.site::after {
  content: ""; position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; margin-left: -4px;
  background: var(--cyan); transform: rotate(45deg); box-shadow: 0 0 10px var(--cyan);
}
footer.site .container { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
footer.site ul { list-style: none; display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- Телефон ---------- */
@media (max-width: 640px) {
  body { background-attachment: scroll; }
  .hero { padding: 70px 0 60px; }
  html:not(.js) header.site .container { justify-content: center; }
}

/* Меню на телефоне: со скриптом — бургер, без скрипта — обычный список */
@media (max-width: 700px) {
  .js .menu-toggle { display: block; }
  .js header.site nav { display: none; width: 100%; order: 3; }
  .js header.site.open nav { display: block; }
  .js header.site nav ul { flex-direction: column; gap: 2px; padding: 6px 0 10px; }
  .js header.site nav a { padding: 12px 14px; }
}

/* ---------- Баннер главной страницы ----------
   На картинке уже написано «MirrorMirage», поэтому на компьютере
   заголовок скрыт (но остаётся для поисковиков и экранных чтецов),
   а на телефоне картинка обрезается и заголовок показывается текстом. */
.hero-banner {
  min-height: 82vh; display: flex; align-items: flex-end; justify-content: center;
  text-align: center; padding: 40px 0 70px;
  background:
    linear-gradient(180deg, rgba(5,10,28,.15) 0%, rgba(5,10,28,.15) 55%, rgba(5,10,28,.92) 100%),
    url("images/bg-citadel.jpg") center / cover no-repeat;
  border-bottom: 1px solid var(--line);
}
.hero-inner { width: min(760px, 92%); }
.hero-title {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
}
.hero-banner .lead { color: #cdd8ff; font-size: 1.15rem; margin: 0 auto 26px; text-shadow: 0 2px 12px #000; }
.hero-banner .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 700px) {
  .hero-banner {
    min-height: 70vh; align-items: center;
    background:
      linear-gradient(180deg, rgba(5,10,28,.55), rgba(5,10,28,.85)),
      url("images/bg-portal.jpg") center / cover no-repeat;
  }
  .hero-title {
    position: static; width: auto; height: auto; clip: auto; overflow: visible;
    font-size: 1.7rem; letter-spacing: .04em; margin-bottom: 14px;
    background: linear-gradient(90deg, #fff, var(--cyan));
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
}

/* ---------- Магазин: витрина, доверие, вопросы ---------- */
.card .price small { display: block; font-size: .8rem; font-weight: 400; color: var(--muted); }
.card .btn + .btn { margin-left: 8px; }

.showcase {
  display: grid; gap: 34px; grid-template-columns: 1.1fr 1fr; align-items: center;
  background: var(--glass); border: 1px solid var(--line); border-radius: 22px;
  padding: 34px; box-shadow: 0 0 40px rgba(47,107,255,.15);
}
.showcase img { width: 100%; display: block; }
.showcase .tag { display: inline-block; font-size: .78rem; padding: 3px 10px; border-radius: 999px; background: rgba(56,214,255,.14); color: var(--cyan); }
.showcase h2 { font-size: 1.6rem; margin: 10px 0; }
.showcase p { color: var(--muted); margin-bottom: 16px; }
.showcase .price-big { font-size: 2rem; font-weight: 700; color: #fff; text-shadow: 0 0 18px rgba(56,214,255,.5); margin-bottom: 4px; }
.showcase .price-big small { font-size: .9rem; font-weight: 400; color: var(--muted); text-shadow: none; }
.showcase .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.showcase .fine { font-size: .8rem; margin: 12px 0 0; }

.trust { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.trust div { text-align: center; padding: 18px 14px; }
.trust b { display: block; color: var(--cyan); font-size: 1.05rem; margin-bottom: 4px; }
.trust span { color: var(--muted); font-size: .9rem; }

details.faq { padding: 14px 20px; margin-bottom: 12px; }
details.faq summary { cursor: pointer; font-weight: 600; }
details.faq p { color: var(--muted); margin-top: 10px; }

/* Юридические ссылки: мелко и спокойно, но всегда доступны */
footer.site .legal { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(120,160,255,.1); font-size: .78rem; color: var(--legal); justify-content: center; transition: color .2s; }
footer.site .legal:hover { color: var(--muted); }
footer.site .legal a { color: inherit; text-decoration: underline; }
footer.site .legal a:hover { color: var(--text); }
.fine { font-size: .8rem; color: var(--muted); }
.fine a { color: var(--muted); text-decoration: underline; }

@media (max-width: 800px) { .showcase { grid-template-columns: 1fr; padding: 22px; } }

/* ============================================================
   Кристальные формы: срезанные углы, рамка-перелив, блик
   Относится к: .card, .trust div, .steps li, details.faq, .btn,
   а также рамке скриншота .showcase > a.
   Как это устроено:
   - clip-path срезает углы (он же обрезает тени, поэтому свечения у этих блоков нет);
   - рамку рисует border-image: градиент, угол которого вращается при наведении;
   - на срезанных углах свет рисуют два маленьких градиента-фона (--glint-*);
   - блик — фон ::after, который один раз проезжает слева направо внутри блока.
   ============================================================ */
@property --edge-angle { syntax: "<angle>"; inherits: false; initial-value: 135deg; }

:root {
  --glint-tl: linear-gradient(135deg, transparent 50%, var(--facet) 50%, var(--facet) calc(50% + 1.5px), transparent calc(50% + 1.5px));
  --glint-br: linear-gradient(135deg, transparent calc(50% - 1.5px), var(--facet) calc(50% - 1.5px), var(--facet) 50%, transparent 50%);
}

.card, .trust div, .steps li, details.faq, .btn.ghost, .showcase > a {
  --cut: 14px;
  position: relative; isolation: isolate;
  border: 1px solid transparent;
  border-image: linear-gradient(var(--edge-angle), var(--cyan), rgba(47,107,255,.15) 50%, var(--cyan)) 1;
  background-color: var(--glass);
  background-image: var(--glint-tl), var(--glint-br);
  background-size: var(--cut) var(--cut);
  background-position: 0 0, 100% 100%;
  background-repeat: no-repeat;
  background-origin: border-box;
  background-clip: border-box;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn.ghost { --cut: 10px; background-color: transparent; backdrop-filter: none; }
.showcase > a { display: block; background-color: transparent; backdrop-filter: none; }
.showcase > a img { clip-path: polygon(13px 0, 100% 0, 100% calc(100% - 13px), calc(100% - 13px) 100%, 0 100%, 0 13px); }

.card, .trust div, .steps li, details.faq, .showcase > a,
.btn, .btn.ghost {
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.btn { --cut: 10px; position: relative; isolation: isolate; }

/* Блик */
.card::after, .trust div::after, .steps li::after, details.faq::after, .showcase > a::after, .btn::after {
  content: ""; position: absolute; inset: 0;
  pointer-events: none; opacity: 0;
  /* блик - это фон, который едет внутри блока: ему негде выйти за край и растянуть страницу */
  background: linear-gradient(100deg, transparent, rgba(160,220,255,.28), transparent) no-repeat;
  background-size: 45% 100%;
  background-position: -90% 0;
}
.card:hover::after, .card:focus-within::after,
.trust div:hover::after, .steps li:hover::after,
details.faq:hover::after, details.faq:focus-within::after,
.showcase > a:hover::after, .showcase > a:focus-visible::after,
.btn:hover::after, .btn:focus-visible::after { animation: sheen .9s ease-out 1; }
@keyframes sheen {
  from { opacity: 1; background-position: -90% 0; }
  to   { opacity: 1; background-position: 190% 0; }
}

/* Перелив рамки при наведении и фокусе */
.card:hover, .card:focus-within, .trust div:hover, .steps li:hover,
details.faq:hover, details.faq:focus-within, .btn.ghost:hover, .btn.ghost:focus-visible,
.showcase > a:hover, .showcase > a:focus-visible { animation: edge-spin 4s linear infinite; }
@keyframes edge-spin { to { --edge-angle: 495deg; } }
.card:hover { background-color: rgba(14, 26, 72, .72); }

/* Фокус с клавиатуры: контур внутри кнопки (снаружи его обрезал бы clip-path) */
.btn:focus-visible { outline: 2px solid #fff; outline-offset: -6px; }
.showcase > a:focus-visible { outline: 2px solid var(--cyan); outline-offset: -4px; }

/* Людям, которым анимация мешает: ничего не двигается и не бегает */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Холст с кристаллами (создаёт crystals.js) ----------
   Лежит под текстом блока, клики пропускает. Без скрипта этих правил просто нет. */
.crystal-host { position: relative; }
canvas.crystals { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.crystal-host > :not(canvas.crystals):not(.scroll-hint) { position: relative; z-index: 1; }

/* Параметр ?reduce-motion — то же, что системная настройка «уменьшить анимацию» (для проверок) */
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after { animation: none !important; transition: none !important; }

/* ============================================================
   Главная страница
   ============================================================ */

/* Стрелка «листайте» внизу первого экрана */
.hero-banner { position: relative; }
.scroll-hint {
  position: absolute; left: 50%; bottom: 14px; z-index: 1; width: 36px; height: 36px; margin-left: -18px;
  display: grid; place-items: center; opacity: .8; animation: hint-bob 2.4s ease-in-out infinite;
}
.scroll-hint:hover { opacity: 1; text-decoration: none; }
.scroll-hint span {
  width: 12px; height: 12px; border-right: 2px solid var(--cyan); border-bottom: 2px solid var(--cyan);
  transform: rotate(45deg) translate(-2px, -2px); filter: drop-shadow(0 0 6px var(--cyan));
}
@keyframes hint-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
section[id] { scroll-margin-top: 80px; }

/* Значки-кристаллы в полосе доверия */
.trust .gem { display: block; width: 18px; height: 18px; margin: 0 auto 8px; filter: drop-shadow(0 0 6px rgba(56,214,255,.6)); }
.gem .g1 { fill: rgba(47,107,255,.45); stroke: var(--cyan); stroke-width: 1; stroke-linejoin: round; }
.gem .g2 { fill: var(--facet); }
.gem .g3 { fill: rgba(56,214,255,.55); }

/* Витрина: рамка скриншота наклоняется за мышью (наклон ставит crystals.js) */
.showcase > a { transition: transform .25s ease-out; }

/* «Другие программы»: компактные карточки (их разметку делает tools/build_catalog.py) */
.grid.mini { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.card.mini { padding: 16px; }
.card.mini > a:first-child { display: block; }
.card.mini .thumb { display: block; width: 100%; height: 110px; object-fit: cover; object-position: top; margin-bottom: 12px; border-radius: 8px; border: 1px solid var(--line); }
.card.mini .placeholder-shot { height: 110px; margin-bottom: 12px; }
.card.mini h3 { font-size: .95rem; margin-bottom: 4px; }
.card.mini .price { font-size: .95rem; margin: 0 0 8px; color: var(--muted); }
.card.mini > a:last-child { font-size: .92rem; font-weight: 600; }

/* «Как купить»: светящаяся линия, соединяющая номера шагов */
.steps { position: relative; }
.steps::before {
  content: ""; position: absolute; left: 36px; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(180deg, transparent, var(--cyan) 14%, var(--cyan) 86%, transparent);
  box-shadow: 0 0 10px var(--cyan); opacity: .55;
}

/* Частые вопросы: плавное раскрытие (где браузер не умеет — раскрывается сразу) */
:root { interpolate-size: allow-keywords; }
@supports selector(::details-content) {
  details.faq::details-content { block-size: 0; overflow: hidden; transition: block-size .35s ease, content-visibility .35s allow-discrete; }
  details.faq[open]::details-content { block-size: auto; }
}

/* Проявление блоков при прокрутке. Класс reveal-on ставит crystals.js: если он не загрузился, блоки видны сразу */
.reveal-on section.block { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal-on section.block.shown { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal-on section.block { opacity: 1; transform: none; } }
html.reduce-motion.reveal-on section.block { opacity: 1; transform: none; }

/* Узкий телефон: длинные слова в заголовках (например «Конфиденциальность») должны помещаться */
@media (max-width: 480px) {
  .page-title h1 { font-size: 1.3rem; letter-spacing: .01em; }
}

/* Служебные страницы (body.calm): только шапка, подвал и шрифты, без анимаций */
body.calm .brand img { animation: none; }
