/* mastersite.kz – общие стили главной и политики конфиденциальности */
:root {
  --ink: #111111;
  --ink-soft: #555555;
  --paper: #ffffff;
  --rule: #d6d6d6;
  --wa: #25D366;
  --wa-press: #1ebe5b;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(24px, 5vw, 84px);
  --panel-h: 0px;
}
* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Onest", "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--ink); color: var(--paper); }

.page { max-width: 1720px; min-height: 100svh; margin: auto; padding: 0 var(--gutter) var(--panel-h); display: flex; flex-direction: column; }
main { flex: 1; }
footer { padding-bottom: clamp(28px, 4vw, 64px); }

/* ---------- Главная ---------- */
.home-main { display: flex; flex-direction: column; justify-content: center; padding-block: clamp(56px, 8vw, 134px); }
.services { list-style: none; margin: 0; padding: 0; max-width: 640px; }
.services li { font-size: clamp(1.5rem, 1.6vw + .9rem, 2rem); line-height: 1.2; letter-spacing: -.025em; font-weight: 400; padding-block: .4em; }
.services li + li { border-top: 1px solid var(--rule); }
.home-main h1 { margin: clamp(48px, 5vw, 72px) 0 0; max-width: 26ch; font-size: min(clamp(2.2rem, 2.6vw + 1.2rem, 3.5rem), calc((100vw - 2 * var(--gutter)) / 10.7)); font-weight: 700; line-height: 1.08; letter-spacing: -.03em; text-wrap: balance; }

/* ---------- Подвал ---------- */
.contact { border-top: 1px solid var(--ink); padding-top: 28px; display: flex; align-items: center; gap: 28px; }
.legal { margin: 20px 0 0; font-size: 1rem; line-height: 1.5; color: var(--ink-soft); }
.legal a { color: var(--ink-soft); text-underline-offset: 3px; }
.legal a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
@media (hover: hover) { .legal a:hover { color: var(--ink); } }

/* ---------- Кнопка WhatsApp ---------- */
.whatsapp { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 68px; padding: 20px 30px 20px 26px; background: var(--wa); color: #fff; border: 0; border-radius: 8px; text-decoration: none; font-size: 1.0625rem; font-weight: 500; letter-spacing: -.01em; line-height: 1.3; -webkit-tap-highlight-color: transparent; transition: background .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease); }
.whatsapp .wa-logo { width: 24px; height: 24px; flex-shrink: 0; fill: currentColor; }
@media (hover: hover) {
  .whatsapp:hover { box-shadow: 0 6px 18px #00000022; transform: translateY(-2px); }
}
.whatsapp:active { transform: translateY(0); box-shadow: none; background: var(--wa-press); }
.whatsapp:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }

/* Плавающая кнопка на десктопе и нижняя панель на мобильной – только на длинных страницах */
.wa-float { position: fixed; right: 24px; bottom: 24px; z-index: 20; width: 60px; height: 60px; border-radius: 50%; background: var(--wa); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px #00000026; -webkit-tap-highlight-color: transparent; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.wa-float svg { width: 32px; height: 32px; fill: currentColor; }
@media (hover: hover) { .wa-float:hover { transform: translateY(-2px); box-shadow: 0 10px 24px #00000030; } }
.wa-float:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.wa-panel { display: none; }

/* ---------- Политика ---------- */
.top { padding-top: clamp(24px, 3vw, 40px); }
.home { color: var(--ink); text-decoration: none; font-size: 1.0625rem; font-weight: 500; letter-spacing: -.01em; }
.home:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 2px; }
@media (hover: hover) { .home:hover { text-decoration: underline; text-underline-offset: 4px; } }

.doc { max-width: 720px; padding-block: clamp(48px, 6vw, 96px); }
.doc h1 { margin: 0; max-width: 20ch; font-size: min(clamp(2.2rem, 2.6vw + 1.2rem, 3.5rem), calc((100vw - 2 * var(--gutter)) / 10.6)); font-weight: 700; line-height: 1.08; letter-spacing: -.03em; text-wrap: balance; }
.doc .date { margin: 20px 0 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.5; }
.doc section { margin-top: clamp(40px, 4vw, 56px); padding-top: 24px; border-top: 1px solid var(--rule); }
.doc h2 { margin: 0 0 16px; font-size: clamp(1.5rem, 1.6vw + .9rem, 2rem); font-weight: 400; line-height: 1.2; letter-spacing: -.025em; }
.doc p, .doc li { font-size: 1.0625rem; line-height: 1.6; }
.doc p { margin: 0 0 12px; }
.doc ul { margin: 0 0 12px; padding-left: 1.2em; }
.doc li { margin-bottom: 4px; }
.doc a { color: var(--ink); text-underline-offset: 3px; }
.doc a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.doc-footer { border-top: 1px solid var(--ink); padding-top: 20px; }
.doc-footer .legal { margin: 0; }
.nowrap { white-space: nowrap; }

/* ---------- Анимация появления главной ---------- */
@media (prefers-reduced-motion: no-preference) {
  .services li, .home-main h1, .contact { animation: rise .9s var(--ease) both; }
  .services li:nth-child(2) { animation-delay: .07s; }
  .services li:nth-child(3) { animation-delay: .14s; }
  .home-main h1 { animation-delay: .28s; }
  .contact { animation-delay: .42s; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  .whatsapp, .wa-float { transition: none; }
}

@media (min-width: 1600px) { .home-page .page { min-height: min(1100px, 100svh); } }

@media (max-width: 650px) {
  .home-main { padding-block: 48px; }
  .services li { padding-block: .3em; }
  .home-main h1 { margin-top: 64px; }
  .contact { flex-direction: column; align-items: stretch; gap: 23px; padding-top: 23px; }
  .whatsapp { width: 100%; min-height: 64px; }
    .doc { padding-block: 40px; }

  .has-panel { --panel-h: 88px; }
  .wa-float { display: none; }
  .wa-panel { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: var(--panel-h); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--rule); }
  .wa-panel .whatsapp { min-height: 0; height: 100%; padding: 0 22px; }
}
