/* KidHome — главная страница для гостей. Палитра приложения (iOS CoreShared/Colors):
   accent #7B5CDA, градиент шапки #8F70F3 → #6B4BD8. Без внешних шрифтов и скриптов
   (CSP: только свои файлы). Одинаковый вид при светлой и тёмной теме системы. */
:root {
  color-scheme: light;
  --accent: #7b5cda;
  --accent-strong: #6b4bd8;
  --accent-soft: #ede8fb;
  --grad: linear-gradient(135deg, #8f70f3 0%, #6b4bd8 100%);
  --peach: #f3dccf;
  --bg: #f8f6fd;
  --tint: #f0ecfb;
  --card: #ffffff;
  --border: rgba(123, 92, 218, .14);
  --title: #25244a;
  --text: #4a4a6a;
  --muted: #7d7c99;
  --ok: #2fa86a;
  --danger: #e5484d;
  --shadow: 0 1px 2px rgba(47, 47, 87, .05), 0 18px 40px -18px rgba(91, 64, 190, .28);
  --radius: 22px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { display: block; }
a { color: var(--accent); }
h1, h2, h3 { color: var(--title); line-height: 1.15; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); letter-spacing: -.02em; }
h3 { font-size: 1.15rem; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 999px; font-weight: 650; font-size: .98rem;
  text-decoration: none; border: 1.5px solid transparent; white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 24px -10px rgba(107, 75, 216, .7); }
.btn-ghost { background: var(--card); color: var(--title); border-color: var(--border); }
.btn-light { background: #fff; color: #4b32b8; }
.btn-outline-light { color: #fff; border-color: rgba(255, 255, 255, .6); }
.btn-lg { min-height: 52px; padding: 14px 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* Шапка */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--title); text-decoration: none; }
.header-nav { display: flex; gap: 22px; margin-left: 12px; }
.header-nav a { color: var(--text); text-decoration: none; font-weight: 550; font-size: .95rem; }
.header-nav a:hover { color: var(--accent); }
.header-actions { margin-left: auto; display: flex; gap: 10px; }

/* Первый экран */
.hero { padding: 56px 0 40px; overflow: hidden; position: relative; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 720px; height: 720px; border-radius: 50%;
  background: radial-gradient(circle, rgba(143, 112, 243, .22), transparent 65%); pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; position: relative; }
.lead { font-size: 1.15rem; margin-top: 20px; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-points { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: .92rem; }
.hero-points li::before { content: "✓"; color: var(--ok); font-weight: 800; margin-right: 6px; }

.store-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 4px; }
.store-badges img { flex: none; }

/* Телефон-иллюстрация */
.hero-visual { position: relative; display: flex; justify-content: center; padding: 20px 0; }
.phone {
  width: 300px; border-radius: 46px; padding: 14px; background: #1b1930;
  box-shadow: 0 40px 80px -30px rgba(60, 40, 140, .55), inset 0 0 0 2px #2e2b48; position: relative;
}
.phone-notch { position: absolute; top: 22px; left: 50%; width: 90px; height: 24px; margin-left: -45px; border-radius: 14px; background: #1b1930; z-index: 2; }
.screen {
  border-radius: 34px; padding: 56px 14px 18px; display: grid; gap: 10px;
  background: linear-gradient(180deg, #8f70f3 0 120px, #f4f1fc 120px);
}
.mock-card { background: #fff; border-radius: 16px; padding: 12px 14px; color: #3d3f66; font-size: .82rem; box-shadow: 0 6px 16px -10px rgba(60, 40, 140, .35); }
.mock-child { display: flex; gap: 10px; align-items: center; }
.mock-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; }
.mock-lines { display: grid; }
.mock-lines span { color: #8a89a5; font-size: .74rem; }
.mock-title { font-weight: 700; margin-bottom: 8px; }
.mock-bar { height: 8px; border-radius: 8px; background: #ece8f9; overflow: hidden; }
.mock-fill { display: block; width: 66%; height: 100%; background: var(--grad); }
.mock-row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.mock-row .muted { color: #8a89a5; }
.mock-schedule .mock-row:first-child { margin-top: 0; }
.mock-toggle { width: 34px; height: 20px; border-radius: 10px; background: #d7d3e8; position: relative; }
.mock-toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.mock-toggle.on { background: #7b5cda; }
.mock-toggle.on::after { left: 16px; }
.mock-map {
  height: 92px; position: relative; padding: 0; overflow: hidden;
  background:
    linear-gradient(90deg, transparent 46%, #fbe9a7 46% 52%, transparent 52%),
    linear-gradient(0deg, transparent 60%, #ffffff 60% 66%, transparent 66%),
    linear-gradient(135deg, #e7f1e2, #e9e6f4);
}
.mock-pin { position: absolute; left: 44%; top: 34px; width: 18px; height: 18px; border-radius: 50%; background: #7b5cda; box-shadow: 0 0 0 6px rgba(123, 92, 218, .25); }
.mock-weather { position: absolute; left: 8px; top: 8px; background: rgba(255, 255, 255, .92); border-radius: 10px; padding: 3px 8px; font-size: .74rem; font-weight: 650; }
.mock-lock { background: #fff; border-radius: 14px; padding: 11px; text-align: center; font-weight: 700; color: #6b4bd8; font-size: .85rem; }
.float {
  position: absolute; background: var(--card); color: var(--title); border: 1px solid var(--border);
  border-radius: 16px; padding: 10px 14px; font-weight: 650; font-size: .88rem; box-shadow: var(--shadow);
  white-space: nowrap;
}
/* Пузыри — по краям телефона, над пустыми местами экрана (шапка, низ). */
.float-chat { left: -64px; top: 64px; z-index: 3; }
.float-sos { right: -16px; bottom: 64px; z-index: 3; }

/* Полоса доверия */
.trust { padding: 10px 0 30px; }
.trust-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.trust-row div { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 16px 18px; display: grid; gap: 2px; }
.trust-row strong { color: var(--title); }
.trust-row span { color: var(--muted); font-size: .9rem; }

/* Разделы */
.section { padding: 76px 0; }
.section-tint { background: var(--tint); }
.section-lead { font-size: 1.08rem; margin: 14px auto 0; max-width: 620px; color: var(--muted); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.feature { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.feature-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); display: grid; place-items: center; font-size: 1.45rem; margin-bottom: 16px; }
.feature p { margin-top: 8px; }

.steps { list-style: none; padding: 0; margin: 44px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: none; }
.step { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; position: relative; }
.step-num { width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; display: grid; place-items: center; margin-bottom: 16px; }
.step p { margin-top: 8px; }

.privacy { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }
.privacy .section-lead { margin-left: 0; }
.privacy-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.privacy-list li { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 18px 20px 18px 54px; position: relative; }
.privacy-list li::before { content: "🔐"; position: absolute; left: 18px; top: 17px; font-size: 1.2rem; }
.privacy-list strong { color: var(--title); }

/* Цены */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 420px)); justify-content: center; gap: 22px; margin-top: 44px; }
.plan { background: var(--card); border: 1px solid var(--border); border-radius: 26px; padding: 30px; display: flex; flex-direction: column; gap: 16px; position: relative; }
.plan-pro { border: 2px solid var(--accent); box-shadow: 0 26px 60px -28px rgba(107, 75, 216, .6); }
.plan-badge { position: absolute; top: -13px; left: 30px; background: var(--grad); color: #fff; font-weight: 800; font-size: .8rem; padding: 4px 12px; border-radius: 999px; }
.plan-price { font-size: 2rem; font-weight: 800; color: var(--title); }
.plan-list { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 10px; flex: 1; }
.plan-list li { padding-left: 28px; position: relative; }
.plan-list li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.plan-list li.minus { color: var(--muted); }
.plan-list li.minus::before { content: "–"; color: var(--muted); }
.plan-options { list-style: none; padding: 14px 0 0; margin: 0; border-top: 1px solid var(--border); display: grid; gap: 8px; font-size: .93rem; }
.plan-options li { display: flex; justify-content: space-between; gap: 12px; }
.plan-options em { font-style: normal; color: var(--ok); font-weight: 650; font-size: .85rem; }
.plan-options strong { color: var(--title); white-space: nowrap; }

/* Вопросы */
.faq { margin-top: 36px; display: grid; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 4px 20px; }
.faq summary { cursor: pointer; list-style: none; font-weight: 700; color: var(--title); padding: 16px 28px 16px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 12px; font-size: 1.4rem; color: var(--accent); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 18px; }

/* Финальный призыв */
.cta { padding: 20px 0 80px; }
.cta-box { background: var(--grad); border-radius: 32px; padding: 56px 32px; text-align: center; color: rgba(255, 255, 255, .9); box-shadow: 0 30px 70px -30px rgba(107, 75, 216, .7); max-width: 1100px; }
.cta-box h2 { color: #fff; }
.cta-box p { margin-top: 12px; font-size: 1.08rem; }
.center-actions { justify-content: center; }

.site-footer { border-top: 1px solid var(--border); padding: 28px 0 36px; }
.footer-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-row nav { display: flex; gap: 18px; }
.footer-row nav a { color: var(--text); text-decoration: none; }
.footer-row .muted { margin-left: auto; font-size: .9rem; }

/* Планшет */
@media (max-width: 960px) {
  .header-nav { display: none; }
  .hero-grid, .privacy { grid-template-columns: 1fr; }
  .hero-visual { order: 2; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .trust-row { grid-template-columns: repeat(2, 1fr); }
}
/* Телефон */
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .header-row { gap: 10px; min-height: 60px; }
  .brand span { font-size: 1.05rem; }
  .header-actions .btn { min-height: 40px; padding: 8px 12px; font-size: .9rem; }
  .hero { padding: 32px 0 24px; }
  .hero-actions .btn { width: 100%; }
  .features, .steps, .plans, .trust-row { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .phone { width: 260px; }
  .float { font-size: .8rem; padding: 8px 10px; }
  .float-chat { left: -12px; top: 18px; }
  .float-sos { right: -12px; bottom: 58px; }
  .cta-box { padding: 40px 20px; border-radius: 24px; }
  .footer-row .muted { margin-left: 0; width: 100%; }
}
@media (max-width: 380px) {
  .brand span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
