:root {
  --navy: #0b2454;
  --blue: #1f5be0;
  --yellow: #ffc632;
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #0b1b3a;
  --muted: #5b6478;
  --line: #e3e7ef;
  --radius: 20px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0f1c;
    --card: #141b2d;
    --text: #eef2fa;
    --muted: #a1aac0;
    --line: #232c42;
    --blue: #6b9bff;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--blue); }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Шапка */
header.top { padding: 18px 0; }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 20px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
nav.top a { color: var(--muted); text-decoration: none; margin-left: 18px; font-size: 15px; }
nav.top a:hover { color: var(--text); }

/* Первый экран */
.hero { background: linear-gradient(135deg, var(--navy), #1a4bc4); color: #fff; border-radius: 28px; margin: 8px 0 0; overflow: hidden; }
.hero .inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 32px; align-items: center; padding: 56px 48px 0; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.08; margin: 0 0 16px; letter-spacing: -0.02em; }
.hero h1 em { font-style: normal; color: var(--yellow); }
.hero p.lead { font-size: 19px; color: #d6e0ff; margin: 0 0 28px; max-width: 34em; }
.hero .phone { align-self: end; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 56px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 14px; font-weight: 700; text-decoration: none; font-size: 17px; }
.btn-store { background: #fff; color: var(--navy); }
.btn-store[aria-disabled="true"] { opacity: 0.92; cursor: default; }
.btn-store small { display: block; font-size: 12px; font-weight: 600; color: #5b6478; line-height: 1.1; }
.btn-store span { display: block; line-height: 1.15; }
.note { color: #b9c7f0; font-size: 14px; }

/* Телефон */
.phone { position: relative; max-width: 320px; margin: 0 auto; }
.phone img { border-radius: 38px 38px 0 0; border: 10px solid #0d1426; border-bottom: 0; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35); background: #0d1426; }

/* Секции */
section { padding: 72px 0 0; }
section h2 { font-size: clamp(26px, 3.6vw, 36px); line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.01em; }
section p.sub { color: var(--muted); margin: 0 0 32px; max-width: 40em; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(31, 91, 224, 0.1); font-size: 22px; margin-bottom: 14px; }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }

.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.shots figure, .hero .inner > * { min-width: 0; }
.shots figure { margin: 0; }
.shots img { border-radius: 30px; border: 8px solid #0d1426; background: #0d1426; box-shadow: 0 16px 40px rgba(11, 36, 84, 0.18); }
.shots figcaption { text-align: center; color: var(--muted); font-size: 15px; margin-top: 12px; }

.steps { counter-reset: s; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.steps .card { position: relative; padding-top: 56px; }
.steps .card::before { counter-increment: s; content: counter(s); position: absolute; top: 20px; left: 24px; width: 28px; height: 28px; border-radius: 50%; background: var(--yellow); color: var(--navy); font-weight: 800; display: grid; place-items: center; font-size: 15px; }

.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 10px 0 0; }

/* Текстовые страницы */
.doc { max-width: 760px; padding: 24px 20px 40px; }
.doc h1 { font-size: 34px; line-height: 1.15; margin: 16px 0 6px; }
.doc .date { color: var(--muted); margin: 0 0 28px; }
.doc h2 { font-size: 21px; margin: 30px 0 8px; }
.doc p, .doc li { color: var(--text); }
.doc .box { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; margin: 18px 0; }

footer { margin-top: 80px; border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
footer a { color: var(--muted); margin-right: 18px; }
footer p { margin: 6px 0 0; max-width: 46em; }

/* Телефоны */
@media (max-width: 860px) {
  .hero .inner { grid-template-columns: minmax(0, 1fr); padding: 40px 24px 0; gap: 8px; }
  .hero .cta { margin-bottom: 32px; }
  .grid, .steps { grid-template-columns: minmax(0, 1fr); }
  .shots { grid-template-columns: repeat(3, 72%); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .shots figure { scroll-snap-align: center; }
  section { padding-top: 56px; }
  nav.top a:not(.keep) { display: none; }
}
@media (max-width: 420px) {
  body { font-size: 16px; }
  .hero { border-radius: 22px; }
  .hero p.lead { font-size: 17px; }
}

/* Поиск на главной */
.hero-search { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 8px; margin: 0 0 22px; }
.hero-search select, .hero-search button, .filters select, .filters input, .filters button {
  font: inherit; font-size: 15px; padding: 12px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); min-width: 0;
}
.hero-search select { border-color: transparent; }
.hero-search button, .filters button { background: var(--yellow); color: var(--navy); font-weight: 800; border: 0; cursor: pointer; padding: 12px 20px; }

/* Страница модели */
.results-head { padding: 24px 0 8px; }
.results-head h1 { font-size: clamp(26px, 4vw, 38px); margin: 6px 0 4px; line-height: 1.15; }
.results-head .sub { color: var(--muted); margin: 0 0 18px; }
.crumbs { color: var(--muted); font-size: 14px; margin: 0; }
.crumbs a { color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters select, .filters input { flex: 1 1 140px; }
.results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 12px; }
.lcard { display: flex; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px; color: var(--text); text-decoration: none; min-width: 0; }
.lcard:hover { border-color: var(--blue); }
.lcard img, .lcard .nophoto { width: 150px; height: 112px; object-fit: cover; border-radius: 12px; flex: none; background: var(--line); display: grid; place-items: center; font-size: 30px; }
.lbody { min-width: 0; }
.lprice { font-size: 22px; font-weight: 800; }
.luah, .lmeta { color: var(--muted); font-size: 13px; }
.lspecs { font-size: 15px; margin: 4px 0; }
.src { font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 5px; background: var(--line); color: var(--muted); }
.bdgs { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.bdg { font-size: 12px; font-weight: 700; padding: 2px 6px; border-radius: 5px; background: rgba(255, 149, 0, 0.15); color: #c46a00; }
.bdg.red { background: rgba(255, 59, 48, 0.12); color: #d70015; }
.also { margin-top: 6px; color: var(--blue); font-size: 13px; font-weight: 700; }
.empty, .hidden-note { color: var(--muted); }
.hidden-note { font-size: 14px; margin-top: 16px; }
.pager { display: flex; justify-content: space-between; margin: 20px 0; }
.pager a { font-weight: 700; text-decoration: none; }
.app-cta { margin-top: 32px; display: flex; gap: 20px; align-items: center; justify-content: space-between; background: linear-gradient(135deg, var(--navy), #1a4bc4); color: #fff; border-radius: 22px; padding: 28px; }
.app-cta h2 { margin: 0 0 6px; font-size: 22px; }
.app-cta p { margin: 0; color: #d6e0ff; }
.models { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; padding-top: 12px; }
.models a { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-decoration: none; color: var(--text); font-weight: 700; display: flex; justify-content: space-between; }
.models a span { color: var(--muted); font-weight: 400; }
.challenge { display: flex; justify-content: center; margin-top: 20px; }

@media (max-width: 860px) {
  .hero-search { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-search button { grid-column: 1 / -1; }
  .results { grid-template-columns: minmax(0, 1fr); }
  .app-cta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 420px) {
  .lcard img, .lcard .nophoto { width: 110px; height: 84px; }
  .lprice { font-size: 19px; }
}

/* Пакеты пропуска на главной */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.plan.hot { border: 2px solid var(--blue); }
.plan b { font-size: 18px; }
.plan .price { font-size: 30px; font-weight: 800; }
.plan small { color: var(--muted); }
@media (max-width: 860px) { .plans { grid-template-columns: minmax(0, 1fr); } }

/* Бейдж App Store — единый на всём сайте */
.appstore { display: inline-flex; align-items: center; gap: 10px; background: #000; color: #fff; text-decoration: none;
  border-radius: 12px; padding: 9px 18px 9px 14px; border: 1px solid rgba(255, 255, 255, 0.35); white-space: nowrap; line-height: 1.05; }
.appstore svg { width: 24px; height: 28px; flex: none; }
.appstore span { display: flex; flex-direction: column; font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.appstore small { font-size: 11px; font-weight: 500; letter-spacing: 0.01em; }
.appstore:hover { background: #1a1a1a; }

/* «Шукаємо…» на странице модели */
.searching { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; margin-top: 12px; }
.searching small { color: var(--muted); }
.clock { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--blue); position: relative; flex: none; }
.clock::before, .clock::after { content: ""; position: absolute; left: 50%; top: 50%; width: 3px; background: var(--blue); border-radius: 2px; transform-origin: 50% 0; }
.clock::before { height: 10px; margin-left: -1.5px; animation: hand 1.2s linear infinite; }
.clock::after { height: 7px; margin-left: -1.5px; animation: hand 14s linear infinite; }
@keyframes hand { from { transform: rotate(180deg); } to { transform: rotate(540deg); } }
.lcard.skeleton { height: 138px; background: linear-gradient(90deg, var(--card) 0%, var(--line) 50%, var(--card) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .clock::before, .clock::after, .lcard.skeleton { animation: none; } }
