/* Страница игры «Хопик» / Hopik (index.html и en.html). Отдельным файлом, а не <style> в странице:
   сервер devandy.me шлёт Content-Security-Policy «style-src 'self'», встроенные стили браузер выбрасывает. */

  /* Шрифты сайта (лежат у нас, /assets/fonts): Unbounded — заголовки, Onest — текст. */
  @font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 700; font-display: swap;
    src: url(/assets/fonts/onest-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
  @font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 700; font-display: swap;
    src: url(/assets/fonts/onest-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
  @font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 400 800; font-display: swap;
    src: url(/assets/fonts/unbounded-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
  @font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 400 800; font-display: swap;
    src: url(/assets/fonts/unbounded-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

  :root {
    color-scheme: light;
    --sky-top: #e3f5ff;
    --sky: #a9def5;
    --meadow: #f3f8ea;
    --meadow-2: #e5f1d4;
    --card: #ffffff;
    --ink: #3a2818;
    --ink-soft: #6b5a49;
    --orange: #f28a2e;
    --orange-deep: #d9620f;
    --green: #2f6b3c;
    --green-soft: #dcefc8;
    --shadow: 0 12px 32px rgba(52, 84, 40, 0.12), 0 2px 6px rgba(52, 84, 40, 0.07);
    --radius: 28px;
    --display: 'Unbounded', 'Onest', system-ui, sans-serif;
    --text: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body { margin: 0; background: var(--meadow); color: var(--ink); font: 400 17px/1.6 var(--text); -webkit-text-size-adjust: 100%; }
  img { display: block; max-width: 100%; height: auto; }
  a { color: var(--orange-deep); text-underline-offset: 3px; }
  :focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 8px; }
  .wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
  .narrow { max-width: 820px; }
  h1, h2, h3 { margin: 0; font-family: var(--display); color: var(--ink); }
  h2 { font-size: clamp(27px, 4.4vw, 42px); line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; }
  h3 { font-size: 19px; line-height: 1.3; font-weight: 700; }
  section { padding: clamp(56px, 8vw, 100px) 0; scroll-margin-top: 8px; }
  .lead { max-width: 660px; margin: 16px 0 0; color: var(--ink-soft); font-size: 18px; }
  .center { text-align: center; }
  .center .lead { margin-left: auto; margin-right: auto; }

  /* ---------- Первый экран ---------- */
  .hero { position: relative; background: linear-gradient(180deg, var(--sky-top) 0%, #c9ebfa 48%, var(--sky) 100%); overflow: hidden; }
  .nav { position: relative; z-index: 2; display: flex; align-items: center; gap: 24px; max-width: 1120px; margin: 0 auto; padding: 16px 20px; }
  .brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 19px/1 var(--display); }
  .brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 4px 12px rgba(30, 70, 110, 0.2); }
  .nav-links { display: flex; align-items: center; gap: 22px; margin-left: auto; font-weight: 600; font-size: 15.5px; }
  .nav-links a { color: var(--ink); text-decoration: none; }
  .nav-links a:hover { color: var(--orange-deep); }
  .nav-links .lang { padding: 6px 13px; border: 1px solid rgba(58, 40, 24, 0.14); border-radius: 999px; background: rgba(255, 255, 255, 0.75); }
  .hero-text { position: relative; z-index: 2; max-width: 780px; margin: 0 auto; padding: 14px 20px 0; text-align: center; }
  .hero-icon { width: 116px; height: 116px; margin: 0 auto 20px; border-radius: 27px; box-shadow: 0 16px 36px rgba(30, 80, 120, 0.3); animation: bob 4.5s ease-in-out infinite; }
  @keyframes bob { 50% { transform: translateY(-8px) rotate(-2deg); } }
  .hero h1 { font-size: clamp(46px, 8.4vw, 88px); line-height: 1; font-weight: 800; color: #fff; letter-spacing: 0.01em;
    text-shadow: 0 3px 0 #ef8a2f, 0 6px 0 #d9620f, 0 16px 30px rgba(30, 70, 110, 0.28); }
  .tagline { margin: 18px 0 0; font: 700 clamp(20px, 2.7vw, 27px)/1.3 var(--text); color: var(--ink); }
  .hero .lead { margin: 10px auto 0; max-width: 560px; color: #4c5b66; }
  .cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }
  .pill { display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 999px; font-weight: 700; font-size: 16px; text-decoration: none; }
  .pill-dark { background: var(--ink); color: #fff; box-shadow: 0 10px 22px rgba(58, 40, 24, 0.25); }
  .pill-dark::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #8be07f; box-shadow: 0 0 0 4px rgba(139, 224, 127, 0.25); }
  .pill-light { border: 1px solid rgba(58, 40, 24, 0.12); background: rgba(255, 255, 255, 0.8); color: var(--ink); }
  .pill-light:hover { background: #fff; color: var(--orange-deep); }
  a.pill-dark:hover { background: var(--orange-deep); }
  .hero-art { display: block; margin-top: -6.5vw; }
  .hero-art img { width: 100%; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 24%); mask-image: linear-gradient(180deg, transparent 0, #000 24%); }

  /* ---------- Как это работает ---------- */
  .how { position: relative; z-index: 3; margin-top: -46px; border-radius: 46px 46px 0 0; background: var(--meadow); }
  .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
  .step { position: relative; padding: 28px 26px 26px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
  .step img { width: 76px; height: 76px; margin-bottom: 16px; }
  .step .num { position: absolute; top: 20px; right: 24px; font: 800 46px/1 var(--display); color: var(--green-soft); }
  .step p { margin: 8px 0 0; color: var(--ink-soft); }
  .grow { margin-top: clamp(56px, 7vw, 88px); }
  .grow-card { margin: 32px 0 0; overflow: hidden; border-radius: 36px; background: var(--card); box-shadow: var(--shadow); }
  .grow-labels { display: grid; grid-template-columns: repeat(3, 1fr); padding: 16px 8px 20px; text-align: center; font: 700 clamp(14px, 2vw, 20px)/1.2 var(--display); }

  /* ---------- Скриншоты ---------- */
  .screens { background: linear-gradient(180deg, var(--meadow), var(--meadow-2)); }
  .screens-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
  .arrows { display: flex; gap: 10px; }
  .arrows button { width: 50px; height: 50px; border: 0; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); color: var(--ink); font: 700 22px/1 var(--text); cursor: pointer; }
  .arrows button:hover { color: var(--orange-deep); }
  .shots { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    padding: 34px max(20px, calc(50vw - 540px)) 30px; scroll-padding: 0 max(20px, calc(50vw - 540px)); }
  .shots::-webkit-scrollbar { display: none; }
  .shots img { flex: none; width: clamp(210px, 62vw, 270px); border-radius: 30px; box-shadow: 0 18px 38px rgba(40, 70, 30, 0.22); scroll-snap-align: start; }

  /* ---------- Питомцы ---------- */
  .pet-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px 18px; margin: 40px 0 0; padding: 0; list-style: none; }
  .pet-grid li { width: calc((100% - 6 * 18px) / 7); text-align: center; }
  .bubble { display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 50% 32%, #fff 0%, var(--c, #fdf1e0) 72%); box-shadow: var(--shadow); transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1); }
  .pet-grid li:hover .bubble { transform: translateY(-7px) scale(1.04); }
  .bubble img { width: 86%; }
  .pet-grid b { display: block; margin-top: 12px; font: 700 16px/1.2 var(--display); }
  .tag { display: inline-block; margin-top: 7px; padding: 3px 10px; border-radius: 999px; background: #ffe6cf; color: var(--orange-deep); font-weight: 700; font-size: 12.5px; }

  /* ---------- Живой питомец ---------- */
  .features { background: var(--meadow-2); }
  .feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
  .feature { padding: 26px 24px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
  .feature img { width: 66px; height: 66px; margin-bottom: 14px; }
  .feature p { margin: 8px 0 0; color: var(--ink-soft); font-size: 16px; }
  .promise { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 34px 0 0; padding: 0; list-style: none; }
  .promise li { display: inline-flex; align-items: center; gap: 8px; padding: 10px 17px; border-radius: 999px; background: rgba(255, 255, 255, 0.85); font-weight: 600; font-size: 15px; }
  .promise li::before { content: "✓"; color: var(--green); font-weight: 800; }

  /* ---------- Поддержка ---------- */
  .support-card { position: relative; overflow: hidden; padding: 42px clamp(24px, 5vw, 50px); border-radius: 36px; background: linear-gradient(135deg, #fff7ea, #ffe7cd); box-shadow: var(--shadow); }
  .support-card > *:not(.peek) { position: relative; z-index: 1; max-width: 520px; }
  .support-card p { margin: 12px 0 0; }
  .peek { position: absolute; right: clamp(-30px, -2vw, 0px); bottom: -22px; width: clamp(150px, 26vw, 250px); }
  .mail { display: inline-flex; align-items: center; gap: 10px; margin-top: 20px; padding: 15px 26px; border-radius: 999px; background: var(--orange-deep); color: #fff; font-weight: 700; font-size: 18px; text-decoration: none; box-shadow: 0 10px 22px rgba(217, 98, 15, 0.32); }
  .mail:hover { background: #c4560b; }
  .hint { color: var(--ink-soft); font-size: 15px; }
  .faq-title { margin: 48px 0 0; font-size: clamp(22px, 3vw, 28px); }
  .faq { display: grid; gap: 10px; margin-top: 18px; }
  .faq details { padding: 0 22px; border-radius: 20px; background: var(--card); box-shadow: 0 2px 10px rgba(52, 84, 40, 0.07); }
  .faq summary { position: relative; padding: 18px 34px 18px 0; font-weight: 700; cursor: pointer; list-style: none; }
  .faq summary::-webkit-details-marker { display: none; }
  .faq summary::after { content: "+"; position: absolute; top: 50%; right: 0; transform: translateY(-50%); color: var(--orange-deep); font: 700 26px/1 var(--display); transition: transform 0.2s; }
  .faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
  .faq details p { margin: 0 0 18px; color: var(--ink-soft); }

  /* ---------- Политика ---------- */
  .privacy { padding-top: 0; }
  .doc { padding: clamp(28px, 5vw, 56px); border-radius: 36px; background: var(--card); box-shadow: var(--shadow); }
  .doc h2 { font-size: clamp(20px, 5.2vw, 36px); overflow-wrap: break-word; }
  .doc .date { margin: 10px 0 0; color: var(--ink-soft); font-size: 15px; }
  .chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 8px; padding: 0; list-style: none; }
  .chips li { padding: 9px 15px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-weight: 700; font-size: 14.5px; }
  .doc h3 { margin: 30px 0 6px; font-size: 18px; }
  .doc p { margin: 10px 0 0; }
  .doc ul { margin: 10px 0 0; padding-left: 22px; }
  .doc li { margin: 8px 0; }
  .doc li::marker { color: var(--orange); }

  /* ---------- Подвал ---------- */
  .footer { padding: 46px 0 calc(46px + env(safe-area-inset-bottom)); color: #e4f2d6; font-size: 15px;
    background: #2d5a2b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cg fill='%23ffffff' fill-opacity='0.07'%3E%3Cg transform='translate(36 40) rotate(-18)'%3E%3Cellipse cx='0' cy='9' rx='10' ry='8.5'/%3E%3Cellipse cx='-10' cy='-4' rx='4' ry='5.2'/%3E%3Cellipse cx='-3.5' cy='-10' rx='4' ry='5.2'/%3E%3Cellipse cx='4' cy='-10' rx='4' ry='5.2'/%3E%3Cellipse cx='10.5' cy='-3.5' rx='4' ry='5.2'/%3E%3C/g%3E%3Cg transform='translate(100 100) rotate(14)'%3E%3Cellipse cx='0' cy='9' rx='10' ry='8.5'/%3E%3Cellipse cx='-10' cy='-4' rx='4' ry='5.2'/%3E%3Cellipse cx='-3.5' cy='-10' rx='4' ry='5.2'/%3E%3Cellipse cx='4' cy='-10' rx='4' ry='5.2'/%3E%3Cellipse cx='10.5' cy='-3.5' rx='4' ry='5.2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
  .footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; }
  .footer .brand { color: #fff; }
  .footer nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
  .footer a { color: #fff; text-decoration: none; font-weight: 600; }
  .footer a:hover { text-decoration: underline; }

  @media (max-width: 960px) {
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
  }
  @media (max-width: 860px) {
    .steps { grid-template-columns: 1fr; gap: 14px; }
    .step { display: grid; grid-template-columns: 64px 1fr; gap: 2px 18px; align-items: start; padding: 22px 22px 22px 20px; }
    .step img { grid-row: span 2; width: 64px; height: 64px; margin: 0; }
    .step .num { display: none; }
    .pet-grid li { width: calc((100% - 3 * 18px) / 4); }
  }
  @media (max-width: 760px) {
    .nav-links a:not(.lang) { display: none; }
    .hero-art { margin-top: -4vw; }
    .how { margin-top: -30px; border-radius: 32px 32px 0 0; }
    .arrows { display: none; }
  }
  @media (max-width: 560px) {
    .feature-grid { grid-template-columns: 1fr; gap: 14px; }
    .feature { display: grid; grid-template-columns: 56px 1fr; gap: 2px 16px; padding: 20px; }
    .feature img { grid-row: span 2; width: 56px; height: 56px; margin: 0; }
    .pet-grid { gap: 18px 12px; }
    .pet-grid li { width: calc((100% - 3 * 12px) / 4); }
    .pet-grid b { font-size: 13px; }
    .tag { padding: 2px 7px; font-size: 11px; white-space: nowrap; }
    .support-card { padding-bottom: 150px; }
    .doc { padding: 26px 22px; }
    .peek { right: 50%; transform: translateX(50%); width: 150px; }
  }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero-icon { animation: none; }
    .bubble { transition: none; }
  }

  /* Английская страница: слова короче — заголовки политики могут быть чуть крупнее. */
  html[lang="en"] .doc h2 { font-size: clamp(22px, 5.2vw, 36px); }

  /* Цвет кружка под каждым питомцем. */
  .bubble-dragon { --c: #ffe2c6; }
  .bubble-fox { --c: #ffdcc8; }
  .bubble-raccoon { --c: #e4e8ee; }
  .bubble-squirrel { --c: #ffe3cc; }
  .bubble-otter { --c: #efe2d4; }
  .bubble-beaver { --c: #f4dfca; }
  .bubble-lemur { --c: #e8ebf0; }
