/* geoplate.app - общий стиль. Цвета - темы приложения (iOS/GPSCamera/GPSCamera/Core/Theme/GPTheme.swift):
   Concrete (светлая, по умолчанию) и Graphite (тёмная, только кнопкой). Акцент - жёлтый штампа FFCC00.
   Шрифт системный (CSP без чужих источников); моноширинный - для «данных», как на штампе.
   Те же переменные --gp-* берёт инструмент (tools/stamp/tool.css). */

:root,
:root[data-theme="light"] {
    color-scheme: light;
    --gp-bg: #ECEBE7;
    --gp-surface: #FFFFFF;
    --gp-surface2: #F5F4F1;
    --gp-ink: #16191D;
    --gp-mute: #555B64;
    --gp-line: #DEDBD4;
    --gp-accent: #FFCC00;
    --gp-accent-ink: #16191D;
    --gp-callout: #FFF3BF;
    --gp-dark: #16191D;
    --gp-dark-ink: #F3F4F5;
    --gp-dark-mute: #A9AFB8;
    --r: 18px;
    --r-sm: 12px;
    --max: 1120px;
    --sans: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --gp-bg: #0F1114;
    --gp-surface: #191C21;
    --gp-surface2: #23272D;
    --gp-ink: #F3F4F5;
    --gp-mute: #A9AFB8;
    --gp-line: #2C3138;
    --gp-accent: #FFD21F;
    --gp-accent-ink: #16191D;
    --gp-callout: #2A2810;
    --gp-dark: #000000;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
    margin: 0;
    background: var(--gp-bg);
    color: var(--gp-ink);
    font: 17px/1.6 var(--sans);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--gp-accent); }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 12px; text-wrap: balance; }
h1 { font-size: clamp(34px, 6.4vw, 60px); font-weight: 800; }
h2 { font-size: clamp(26px, 3.8vw, 36px); font-weight: 750; }
h3, .h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
h2 a { text-decoration: none; }
p { margin: 0 0 12px; }
:focus-visible { outline: 3px solid var(--gp-accent); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: 16px; padding-right: 16px; }
@media (min-width: 720px) { .wrap { padding-left: 28px; padding-right: 28px; } }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--gp-accent); color: var(--gp-accent-ink); padding: 8px 14px; border-radius: 99px; z-index: 50; }
.skip:focus { left: 8px; }

/* Шапка */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--gp-bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--gp-line); }
.nav-in { max-width: var(--max); margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
@media (min-width: 720px) { .nav-in { padding: 12px 28px; } }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; letter-spacing: -0.01em; text-decoration: none; }
.brand img { border-radius: 8px; }
.nav-links { display: none; gap: 22px; margin-left: 18px; font-size: 15px; font-weight: 600; }
.nav-links a { text-decoration: none; color: var(--gp-mute); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--gp-ink); }
@media (min-width: 860px) { .nav-links { display: flex; } }
.theme { margin-left: auto; width: 38px; height: 38px; border-radius: 99px; border: 1px solid var(--gp-line); background: var(--gp-surface); color: var(--gp-ink); display: grid; place-items: center; cursor: pointer; padding: 0; }
.theme svg { width: 18px; height: 18px; fill: currentColor; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px; border-radius: 99px; background: var(--gp-accent); color: var(--gp-accent-ink); font-weight: 750; font-size: 16px; text-decoration: none; border: 0; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; box-shadow: 0 1px 0 rgba(0,0,0,.12), inset 0 -2px 0 rgba(0,0,0,.08); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px -6px rgba(0,0,0,.35); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn-ghost { background: transparent; color: var(--gp-ink); box-shadow: inset 0 0 0 1.5px var(--gp-ink); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--gp-ink), 0 6px 18px -8px rgba(0,0,0,.3); }

/* Крошки */
.crumbs { padding-top: 18px; font-size: 14px; color: var(--gp-mute); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* Первый экран */
.eyebrow { font: 600 12.5px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--gp-mute); margin: 0 0 14px; display: inline-flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ""; width: 10px; height: 10px; background: var(--gp-accent); border-radius: 2px; }
.hero { display: grid; gap: 28px; padding-top: 28px; padding-bottom: 24px; align-items: center; }
.hero-inner { padding-top: 18px; }
.lead { font-size: clamp(18px, 2.2vw, 21px); line-height: 1.55; color: var(--gp-ink); max-width: 38em; }
.hero-act { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 10px; }
.note { font-size: 14px; color: var(--gp-mute); margin: 0; }
.hero-shot { max-width: 420px; justify-self: center; width: 100%; }
@media (min-width: 900px) {
    .hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; padding-top: 56px; padding-bottom: 40px; }
    .hero-inner { padding-top: 28px; }
    .hero-shot { justify-self: end; transform: rotate(1.5deg); }
}
.hero-plain { padding-top: 28px; padding-bottom: 8px; }
.hero-plain .lead { margin-bottom: 18px; }

/* Кадр со штампом */
.shot { margin: 0; }
.shot img { border-radius: var(--r); box-shadow: 0 1px 0 rgba(0,0,0,.06), 0 24px 48px -24px rgba(22,25,29,.45); background: var(--gp-surface2); }
.shot figcaption { font: 500 13px/1.45 var(--mono); color: var(--gp-mute); margin-top: 12px; }

/* Секции */
.sec { padding-top: 44px; padding-bottom: 8px; }
@media (min-width: 900px) { .sec { padding-top: 72px; } }
.sec-intro { color: var(--gp-mute); max-width: 40em; margin-bottom: 22px; }
.prose { max-width: calc(46em + 56px); margin-left: 0; }
@media (min-width: 1176px) { .prose { margin-left: calc((100vw - var(--max)) / 2); } }
.prose p { max-width: 40em; }

.grid { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .grid-2, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.card { background: var(--gp-surface); border: 1px solid var(--gp-line); border-radius: var(--r); padding: 20px 20px 18px; }
.card p { color: var(--gp-mute); margin: 0; }
.card p + p { margin-top: 10px; }
.card h3 { margin-bottom: 6px; }
.fields .card h3::before { content: ""; display: block; width: 26px; height: 4px; background: var(--gp-accent); border-radius: 2px; margin-bottom: 14px; }

.card-link { padding: 0; transition: border-color .15s ease, transform .15s ease; }
.card-link:hover { border-color: var(--gp-ink); transform: translateY(-2px); }
.card-link > a { display: block; height: 100%; padding: 20px 20px 18px; text-decoration: none; position: relative; }
.card-link .more { position: absolute; right: 18px; top: 18px; font-weight: 700; }
.card-link h3, .card-link .h3 { padding-right: 28px; }
.card-photo > a { padding: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: inherit; }
/* Фото сверху, кадр снизу: штамп стоит внизу кадра и остаётся читаемым */
.card-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 88%; border-bottom: 1px solid var(--gp-line); }
.card-photo img.top { object-position: center 4%; }
.card-photo a > div { padding: 16px 20px 18px; display: block; }
.card-photo .h3, .card-photo h3 { font-size: 18px; margin: 0 0 6px; }

/* Шаги */
.steps { list-style: none; counter-reset: s; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.steps li { counter-increment: s; background: var(--gp-surface); border: 1px solid var(--gp-line); border-radius: var(--r); padding: 20px; }
.steps li::before { content: counter(s, decimal-leading-zero); display: inline-block; font: 700 13px/1 var(--mono); background: var(--gp-ink); color: var(--gp-bg); padding: 6px 8px; border-radius: 6px; margin-bottom: 14px; }
.steps p { color: var(--gp-mute); margin: 0; }

.ticks { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
@media (min-width: 640px) { .ticks { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; } }
.ticks li { position: relative; padding-left: 26px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 12px; height: 7px; border-left: 2.5px solid var(--gp-ink); border-bottom: 2.5px solid var(--gp-ink); transform: rotate(-45deg); }

.callout { background: var(--gp-callout); border-radius: var(--r); padding: 20px 22px; margin-top: 18px; }
.callout h2 { font-size: 22px; }
.callout p { margin: 0; }

.gallery { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.split { display: grid; gap: 22px; }
.split .btn { margin-top: 8px; }
.split-side { display: grid; gap: 14px; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; } }

/* Блок App Store */
.cta { max-width: var(--max); margin: 48px auto 0; padding: 0 16px; }
@media (min-width: 720px) { .cta { padding: 0 28px; margin-top: 72px; } }
.cta-in { background: var(--gp-dark); color: var(--gp-dark-ink); border-radius: 24px; padding: 26px 22px; display: grid; gap: 18px; align-items: center; }
.cta-icon { border-radius: 16px; }
.cta-title { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 6px; }
.cta-text { color: var(--gp-dark-mute); margin: 0; }
.cta-act { display: grid; gap: 8px; justify-items: start; }
.cta-note { font-size: 13px; color: var(--gp-dark-mute); margin: 0; }
@media (min-width: 860px) { .cta-in { grid-template-columns: auto minmax(0, 1fr) auto; padding: 30px 34px; gap: 26px; } .cta-act { justify-items: end; } }

/* Вопросы */
.faq-list { max-width: 48em; margin-top: 10px; }
.faq details { border-top: 1px solid var(--gp-line); padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid var(--gp-line); }
.faq summary { font-weight: 700; font-size: 18px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 500 22px/1 var(--mono); color: var(--gp-mute); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--gp-mute); margin: 10px 0 0; max-width: 42em; }

.list { padding-left: 1.2em; }

/* Инструмент */
.tool-wrap { margin-top: 18px; }

/* Подвал */
.footer { background: var(--gp-dark); color: var(--gp-dark-ink); margin-top: 72px; padding: 44px 0 28px; }
.footer-in { max-width: var(--max); margin: 0 auto; padding: 0 16px; display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .footer-in { padding: 0 28px; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .footer-in { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-col { display: flex; flex-direction: column; gap: 8px; font-size: 15px; align-items: flex-start; }
.footer-col p { color: var(--gp-dark-mute); margin: 4px 0 8px; max-width: 26em; }
.footer-col a { color: var(--gp-dark-mute); text-decoration: none; }
.footer-col a:hover { color: var(--gp-dark-ink); }
.footer-col a.btn { color: var(--gp-accent-ink); margin-top: 4px; }
.footer-col b, .footer-col b a { color: var(--gp-dark-ink); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; font-family: var(--mono); margin-bottom: 4px; }
.footer .brand-foot { color: var(--gp-dark-ink); }
.footer-langs { max-width: var(--max); margin: 28px auto 0; padding: 0 16px; display: flex; flex-wrap: wrap; gap: 12px; font-size: 14px; }
.footer-fine { max-width: var(--max); margin: 32px auto 0; padding: 18px 16px 0; border-top: 1px solid #2C3138; font-size: 13px; color: var(--gp-dark-mute); }
@media (min-width: 720px) { .footer-langs, .footer-fine { padding-left: 28px; padding-right: 28px; } }

/* Подсказка браузера TikTok/Instagram */
.inapp { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; background: var(--gp-dark); color: var(--gp-dark-ink); border-radius: 16px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; box-shadow: 0 12px 32px rgba(0,0,0,.35); font-size: 15px; }
.inapp[hidden] { display: none; }
.inapp p { margin: 0; flex: 1; }
.inapp-actions { display: flex; gap: 8px; }
.inapp button { border: 0; border-radius: 99px; padding: 8px 12px; background: var(--gp-accent); color: var(--gp-accent-ink); font-weight: 700; cursor: pointer; }
.inapp #inapp-close { background: transparent; color: var(--gp-dark-ink); font-size: 20px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .hero-shot { transform: none !important; } }
