/* Pudding — бренд-стили сайта. Палитра 1-в-1 с приложением (Theme.swift). */

:root {
  --accent: #FC7D4F;
  --accent-deep: #F75470;
  --sunny: #FFC747;
  --mint: #5CCC99;
  --sky: #66AEF2;
  --lilac: #A88CED;
  --cream: #FFFAED;
  --pink: #FFEBEF;
  --ink: #332941;
  --muted: #7a7080;
  --card: #ffffff;
  --radius: 24px;
  --shadow: 0 16px 40px rgba(247, 84, 112, 0.10), 0 2px 6px rgba(0, 0, 0, 0.04);
  --accent-grad: linear-gradient(135deg, var(--accent), var(--accent-deep));
  /* Nunito не покрывает CJK — после него системные японский/корейский/китайский,
     иначе браузер подставляет случайный засечный фолбэк. */
  --font: "Nunito", -apple-system, "SF Pro Rounded", system-ui,
          "Hiragino Sans", "Yu Gothic", "Apple SD Gothic Neo", "Malgun Gothic",
          "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, var(--cream), var(--pink));
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

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

/* ---- Шапка ---- */
header.site {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: saturate(140%) blur(10px);
  background: rgba(255, 250, 237, 0.78);
  border-bottom: 1px solid rgba(51, 41, 65, 0.06);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; }
.brand img { width: 38px; height: 38px; }
.nav-right { display: flex; align-items: center; gap: 18px; font-weight: 700; }
/* Юридические страницы (privacy/terms) живут только на RU+EN — там простой RU · EN. */
.lang { font-size: 14px; color: var(--muted); }
.lang a { color: var(--muted); }
.lang a.active { color: var(--ink); }

/* Лендинг — 14 языков: дропдаун на <details>, без JS (CSP: script-src 'self'). */
.langpick { position: relative; font-size: 14px; }
.langpick > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(51, 41, 65, .12); background: rgba(255, 255, 255, .6);
}
.langpick > summary::-webkit-details-marker { display: none; }
.langpick > summary:hover { color: var(--ink); }
.langpick[open] > summary { color: var(--ink); background: #fff; }
.langpick .globe { font-size: 13px; }
.langmenu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20;
  display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)); gap: 2px;
  padding: 8px; border-radius: 18px; background: #fff;
  box-shadow: var(--shadow); border: 1px solid rgba(51, 41, 65, .08);
}
.langmenu a {
  display: block; padding: 8px 12px; border-radius: 12px;
  color: var(--muted); font-weight: 700; white-space: nowrap;
}
.langmenu a:hover { background: var(--cream); color: var(--ink); text-decoration: none; }
.langmenu a.active { color: var(--ink); background: var(--pink); }

/* ---- Кнопки ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; color: #fff; background: var(--accent-grad);
  padding: 14px 26px; border-radius: 999px; border: none; cursor: pointer;
  box-shadow: 0 10px 22px rgba(252, 125, 79, 0.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; box-shadow: 0 14px 28px rgba(252, 125, 79, 0.42); }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

/* ---- Hero ---- */
.hero { text-align: center; padding: 70px 0 40px; }
.hero .mascot { width: 168px; height: 168px; margin: 0 auto 18px; display: block; filter: drop-shadow(0 14px 24px rgba(247,84,112,.22)); }
.hero h1 { font-size: clamp(32px, 6vw, 54px); font-weight: 900; line-height: 1.1; letter-spacing: -0.5px; }
.hero p.sub { font-size: clamp(17px, 2.4vw, 21px); color: var(--muted); max-width: 620px; margin: 16px auto 28px; }
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---- Секции ---- */
section.block { padding: 56px 0; }
section.block h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 900; text-align: center; letter-spacing: -0.3px; }
section.block .lead { text-align: center; color: var(--muted); max-width: 640px; margin: 14px auto 0; font-size: 18px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin-top: 36px; }
.card {
  background: var(--card); border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.9);
}
.card .emoji { font-size: 38px; display: block; margin-bottom: 12px; }
.card h3 { font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 15px; }

/* ---- Плитка-иконка с иллюстрацией продукта (как в приложении) ---- */
.tile {
  width: 64px; height: 64px; border-radius: 20px; display: flex;
  align-items: center; justify-content: center; margin-bottom: 14px;
  border: 1px solid rgba(255,255,255,.7);
}
.tile img { width: 64%; height: 64%; object-fit: contain; }
.tile.veg   { background: linear-gradient(135deg, rgba(92,204,153,.30), rgba(92,204,153,.16)); }
.tile.obs   { background: linear-gradient(135deg, rgba(102,174,242,.30), rgba(102,174,242,.16)); }
.tile.aller { background: linear-gradient(135deg, rgba(252,125,79,.30), rgba(252,125,79,.16)); }
.tile.cal   { background: linear-gradient(135deg, rgba(168,140,237,.30), rgba(168,140,237,.16)); }

/* ---- Полоса доверия (бейджи, без фейковых рейтингов) ---- */
.trust-band { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.trust-band .badge {
  display: inline-flex; align-items: center; gap: 8px; background: #fff;
  border-radius: 999px; padding: 10px 18px; font-weight: 700; font-size: 14px;
  box-shadow: var(--shadow); color: var(--ink);
}
.trust-band .badge .ico { font-size: 18px; }

/* ---- Как это работает (3 шага) ---- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin-top: 36px; }
.step { text-align: center; position: relative; }
.step .num {
  width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 22px; color: #fff; background: var(--accent-grad);
  box-shadow: 0 8px 18px rgba(252,125,79,.32);
}
.step h3 { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 15px; }

/* ---- Sticky CTA bar (моб) ---- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: none; justify-content: center; gap: 12px; padding: 12px 16px;
  background: rgba(255,250,237,.92); backdrop-filter: blur(10px);
  border-top: 1px solid rgba(51,41,65,.08);
}
.sticky-cta .btn { padding: 12px 22px; }
@media (max-width: 720px) {
  .sticky-cta { display: flex; }
  body { padding-bottom: 78px; }
}

/* ---- Privacy-фича ---- */
.privacy-feature {
  background: var(--accent-grad); color: #fff; border-radius: 28px;
  padding: 46px 32px; text-align: center; box-shadow: 0 18px 40px rgba(247,84,112,.30);
}
.privacy-feature h2 { color: #fff; }
.privacy-feature .lead { color: rgba(255,255,255,.92); }
.privacy-feature .pills { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.privacy-feature .pill { background: rgba(255,255,255,.18); padding: 10px 18px; border-radius: 999px; font-weight: 700; }

/* ---- FAQ ---- */
.faq { max-width: 760px; margin: 30px auto 0; }
.faq details {
  background: #fff; border-radius: 18px; padding: 18px 22px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.faq summary { font-weight: 800; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq details[open] summary { color: var(--accent-deep); }
.faq p { color: var(--muted); margin-top: 10px; }

/* ---- Footer ---- */
footer.site { padding: 40px 0; text-align: center; color: var(--muted); font-size: 14px; }
footer.site .links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; font-weight: 700; }
footer.site .disclaimer { max-width: 640px; margin: 14px auto 0; font-size: 13px; opacity: .85; }

/* ---- Legal-страницы ---- */
.legal { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 44px clamp(22px, 5vw, 56px); margin: 40px auto; max-width: 820px; }
.legal h1 { font-size: 34px; font-weight: 900; margin-bottom: 6px; }
.legal .updated { color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.legal h2 { font-size: 22px; font-weight: 800; margin: 28px 0 10px; }
.legal p, .legal li { color: #4a4255; margin-bottom: 12px; }
.legal ul { padding-left: 22px; }
.legal .callout { background: var(--pink); border-left: 4px solid var(--accent); border-radius: 12px; padding: 16px 18px; margin: 18px 0; }

/* ---- Hero-сетка: текст слева, телефон справа ---- */
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 36px; align-items: center; text-align: left; }
.hero-grid .mascot { margin: 0 0 14px; width: 96px; height: 96px; }
.hero-grid p.sub { margin: 16px 0 26px; }
.hero-grid .cta-row, .hero-grid .trust-band { justify-content: flex-start; }
.hero-shot { display: flex; justify-content: center; }
.hero-shot .phone { max-width: 290px; transform: rotate(2.5deg); }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-grid .mascot { margin: 0 auto 14px; }
  .hero-grid .cta-row, .hero-grid .trust-band { justify-content: center; }
  .hero-shot { margin-top: 30px; }
  .hero-shot .phone { max-width: 240px; }
}

/* ---- Телефонная рамка для реальных скриншотов ---- */
.phone {
  border-radius: 42px; background: #241c33; padding: 10px;
  box-shadow: 0 30px 60px rgba(51, 41, 65, .28), 0 8px 20px rgba(51, 41, 65, .14);
}
.phone img { width: 100%; height: auto; display: block; border-radius: 33px; }

/* ---- Галерея скриншотов (скролл-снап на мобиле) ---- */
.gallery {
  display: flex; gap: 22px; margin-top: 36px; padding: 16px 8px 34px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery figure { flex: 0 0 auto; width: 224px; scroll-snap-align: center; }
.gallery figure:first-child { margin-left: auto; }
.gallery figure:last-child { margin-right: auto; }
.gallery figcaption { text-align: center; font-weight: 800; font-size: 14px; color: var(--muted); margin-top: 12px; }
/* Компактная тень: большая мягкая клипается скролл-контейнером и выглядит
   как «кривой серый фон». */
.gallery .phone {
  transition: transform .2s ease;
  box-shadow: 0 10px 24px rgba(51, 41, 65, .18), 0 3px 8px rgba(51, 41, 65, .10);
}
.gallery figure:hover .phone { transform: translateY(-6px); }

/* ---- Узкие экраны: ужимаем отступы, прячем пункты меню (п.26) ---- */
@media (max-width: 720px) {
  .nav-right > a { display: none; }   /* остаётся только переключатель языка */
  .langmenu { max-height: 60vh; overflow-y: auto; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .hero { padding-top: 24px; }
  .hero h1 { font-size: clamp(28px, 8vw, 36px); overflow-wrap: break-word; }
  .privacy-feature { padding: 36px 20px; }
  .sticky-cta { gap: 8px; padding: 10px 12px; }
  .sticky-cta .btn { padding: 11px 16px; font-size: 15px; }
  .gallery figure { width: 200px; }
}

/* ---- Блог ---- */
.postlist, .post { padding: 48px 20px 64px; }
.postlist h1, .post h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 900; line-height: 1.15; }
.postlist .lead { color: var(--muted); font-size: 18px; margin-top: 12px; }
.postcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 32px; }
.postcard {
  background: var(--card); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); color: var(--ink); display: block;
  transition: transform .2s ease;
}
.postcard:hover { transform: translateY(-4px); text-decoration: none; }
.postcard h2 { font-size: 20px; font-weight: 800; line-height: 1.3; }
.postcard p { color: var(--muted); margin-top: 10px; font-size: 15px; }
.post-date { display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 700; color: var(--muted); }

/* Читалка: узкая колонка, крупный интерлиньяж. */
.post { max-width: 720px; }
.post-back { font-weight: 700; font-size: 15px; margin-bottom: 18px; }
.post article { font-size: 18px; line-height: 1.7; }
.post article h2 { font-size: 26px; font-weight: 800; margin: 34px 0 12px; line-height: 1.25; }
.post article h3 { font-size: 20px; font-weight: 800; margin: 26px 0 10px; }
.post article p { margin: 14px 0; }
.post article ul, .post article ol { margin: 14px 0 14px 22px; }
.post article li { margin: 7px 0; }
.post article code {
  background: #fff; border: 1px solid rgba(51, 41, 65, .10);
  border-radius: 8px; padding: 1px 6px; font-size: .9em;
}
.post-cta {
  display: flex; gap: 18px; align-items: center; margin-top: 44px;
  background: var(--card); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
}
.post-cta h2 { font-size: 20px; font-weight: 800; }
.post-cta p { color: var(--muted); margin: 8px 0 16px; font-size: 15px; }
.post-disclaimer { margin-top: 28px; font-size: 13px; color: var(--muted); }

@media (max-width: 480px) {
  .postlist, .post { padding: 28px 16px 48px; }
  .post article { font-size: 17px; }
  .post-cta { flex-direction: column; text-align: center; }
}
