/* =========================================================================
   DevGate — статическая версия. Дизайн-система: «двое ворот, один шлюз».
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@600;700;800&family=Manrope:wght@400;500;600;700&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
  --color-bg: #F1F3EE;
  --color-surface: #FFFFFF;
  --color-ink: #171A21;
  --color-muted: #666B60;
  --color-line: #DBDED4;

  --color-google: #2F6B4F;
  --color-google-soft: #E4EEE7;
  --color-apple: #5B4E8C;
  --color-apple-soft: #EAE7F3;

  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;

  --shadow-card: 0 1px 2px rgba(23, 26, 33, 0.04), 0 8px 24px -12px rgba(23, 26, 33, 0.12);
  --container-w: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

:focus-visible { outline: 2px solid var(--color-ink); outline-offset: 2px; border-radius: 4px; }

.container { max-width: var(--container-w); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--color-line);
  background: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(6px);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--container-w);
  margin: 0 auto;
  gap: 20px;
  position: relative;
}
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; white-space: nowrap; }
.logo__mark { position: relative; width: 30px; height: 24px; flex-shrink: 0; }
.logo__mark span { position: absolute; top: 0; width: 20px; height: 20px; border-radius: 7px; }
.logo__mark span:first-child { left: 0; background: var(--color-google); }
.logo__mark span:last-child { left: 10px; background: var(--color-apple); opacity: 0.9; }

.main-nav { display: flex; gap: 28px; font-size: 15px; font-weight: 600; }
.main-nav a { color: var(--color-muted); transition: color 0.15s ease; }
.main-nav a:hover, .main-nav a.active { color: var(--color-ink); }

.header-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 100px;
  background: var(--color-ink); color: #fff; font-weight: 600; font-size: 14px;
  white-space: nowrap; transition: transform 0.15s ease, opacity 0.15s ease;
}
.header-cta:hover { transform: translateY(-1px); opacity: 0.92; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--color-line);
  border-radius: 8px; padding: 8px 10px;
}
@media (max-width: 860px) {
  .main-nav { display: none; }
  .main-nav.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--color-surface); padding: 16px 24px; border-bottom: 1px solid var(--color-line); gap: 14px; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Hero ---------- */

.hero { position: relative; overflow: hidden; padding: 72px 0 56px; }
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(480px 320px at 15% 20%, rgba(47, 107, 79, 0.14), transparent 70%),
    radial-gradient(480px 320px at 85% 10%, rgba(91, 78, 140, 0.14), transparent 70%);
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-muted); background: var(--color-surface); border: 1px solid var(--color-line);
  padding: 6px 12px; border-radius: 100px; margin-bottom: 24px;
}
.hero__title { font-size: clamp(34px, 5.4vw, 58px); max-width: 820px; margin-bottom: 20px; }
.hero__title .accent-google { color: var(--color-google); }
.hero__title .accent-apple { color: var(--color-apple); }
.hero__subtitle { font-size: 18px; color: var(--color-muted); max-width: 620px; margin-bottom: 36px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 56px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 100px; font-weight: 700; font-size: 15px;
  border: 1.5px solid transparent; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--google { background: var(--color-google); color: #fff; }
.btn--google:hover { box-shadow: 0 8px 20px -8px rgba(47,107,79,0.55); }
.btn--apple { background: var(--color-apple); color: #fff; }
.btn--apple:hover { box-shadow: 0 8px 20px -8px rgba(91,78,140,0.55); }
.btn--ghost { background: transparent; border-color: var(--color-line); color: var(--color-ink); }
.btn--ghost:hover { border-color: var(--color-ink); }
.btn--ink { background: var(--color-ink); color: #fff; }
.btn--sm { padding: 8px 14px; font-size: 13px; }

.gateway {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  border-radius: var(--radius-l); overflow: hidden; border: 1px solid var(--color-line); background: var(--color-line);
}
.gateway__panel { background: var(--color-surface); padding: 28px 26px; display: flex; flex-direction: column; gap: 10px; transition: background 0.2s ease; }
.gateway__panel:hover { background: var(--color-bg); }
.gateway__panel .dot { width: 10px; height: 10px; border-radius: 50%; margin-bottom: 6px; }
.gateway__panel--google .dot { background: var(--color-google); }
.gateway__panel--apple .dot { background: var(--color-apple); }
.gateway__panel h3 { font-size: 18px; margin-bottom: 2px; }
.gateway__panel p { margin: 0; color: var(--color-muted); font-size: 14.5px; }
.gateway__stats { display: flex; gap: 18px; margin-top: 12px; font-family: var(--font-mono); font-size: 12.5px; }
.gateway__stats div span { display: block; color: var(--color-muted); font-family: var(--font-body); }
.gateway__stats div strong { font-size: 15px; }

/* ---------- Sections ---------- */

.section { padding: 64px 0; }
.section--tight { padding: 40px 0; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.section__title { font-size: clamp(24px, 3vw, 32px); margin: 0; }
.section__desc { color: var(--color-muted); max-width: 520px; margin: 8px 0 0; }
.section__link { font-weight: 700; font-size: 14px; white-space: nowrap; border-bottom: 1.5px solid var(--color-ink); padding-bottom: 2px; }

.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .timeline { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .timeline { grid-template-columns: 1fr; } }
.timeline__step { background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-m); padding: 22px 20px; }
.timeline__num { font-family: var(--font-mono); font-size: 13px; color: var(--color-muted); margin-bottom: 14px; }
.timeline__step h4 { font-size: 16px; margin-bottom: 6px; }
.timeline__step p { margin: 0; color: var(--color-muted); font-size: 14px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-m);
  padding: 22px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow-card); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); }

.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 100px; width: fit-content; }
.tag .dot { width: 7px; height: 7px; border-radius: 50%; }
.tag--google { background: var(--color-google-soft); color: var(--color-google); }
.tag--google .dot { background: var(--color-google); }
.tag--apple { background: var(--color-apple-soft); color: var(--color-apple); }
.tag--apple .dot { background: var(--color-apple); }

.card h3 { font-size: 17px; margin: 0; }
.card p { margin: 0; color: var(--color-muted); font-size: 14px; flex-grow: 1; }
.card__meta { font-family: var(--font-mono); font-size: 12px; color: var(--color-muted); }

.product-card {
  background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-l);
  padding: 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-card);
}
.product-card__price { font-family: var(--font-mono); font-size: 24px; font-weight: 600; }
.product-card ul { margin: 0; padding-left: 18px; color: var(--color-muted); font-size: 14.5px; display: flex; flex-direction: column; gap: 6px; }

.article-header { padding: 56px 0 24px; }
.article-header h1 { font-size: clamp(28px, 4vw, 42px); max-width: 780px; }
.article-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }

.prose { max-width: 720px; font-size: 17px; line-height: 1.75; }
.prose h2 { font-size: 24px; margin-top: 1.6em; }
.prose h3 { font-size: 19px; margin-top: 1.3em; }
.prose p { margin: 0 0 1.1em; color: #262A32; }
.prose ul { margin: 0 0 1.1em; padding-left: 22px; color: #262A32; }
.prose li { margin-bottom: 0.4em; }
.prose strong { color: var(--color-ink); }

.breadcrumbs { font-size: 13px; color: var(--color-muted); margin-bottom: 18px; }
.breadcrumbs a:hover { color: var(--color-ink); }

.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-field label { font-size: 13px; font-weight: 600; color: var(--color-muted); }
.form-field input, .form-field textarea, .form-field select {
  font-family: var(--font-body); font-size: 15px; padding: 11px 14px; border-radius: var(--radius-s);
  border: 1px solid var(--color-line); background: var(--color-surface); color: var(--color-ink); width: 100%;
}
.form-field input:focus, .form-field textarea:focus { border-color: var(--color-ink); }
.form-field textarea { resize: vertical; min-height: 90px; }

.alert { padding: 12px 16px; border-radius: var(--radius-s); font-size: 14px; margin-bottom: 16px; }
.alert--success { background: var(--color-google-soft); color: var(--color-google); }
.alert--error { background: #FBE7E4; color: #A23B2E; }

.site-footer { border-top: 1px solid var(--color-line); padding: 48px 0 32px; margin-top: 64px; color: var(--color-muted); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h5 { font-family: var(--font-body); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-ink); margin: 0 0 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-grid a:hover { color: var(--color-ink); }
.footer-bottom { border-top: 1px solid var(--color-line); padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

.empty-state { text-align: center; padding: 64px 20px; color: var(--color-muted); border: 1px dashed var(--color-line); border-radius: var(--radius-m); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; }
