/* Палитра — из UI-кита игры: небо, зелёная кнопка, чернильный текст. */
:root {
  --sky-top: #bfecf8;
  --sky-bottom: #eafaf3;
  --ink: #2b2440;
  --soft: #5d5478;
  --green: #57b846;
  --green-light: #8fe06a;
  --green-shadow: #3e8a2e;
  --blue: #4aa8ff;
  --amber: #ffd23e;
  --card: rgba(255, 255, 255, 0.92);
}

@font-face { font-family: 'Fredoka'; font-weight: 400; font-display: swap; src: url('/fonts/fredoka-latin-400.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Fredoka'; font-weight: 600; font-display: swap; src: url('/fonts/fredoka-latin-600.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Fredoka'; font-weight: 700; font-display: swap; src: url('/fonts/fredoka-latin-700.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Fredoka'; font-weight: 400; font-display: swap; src: url('/fonts/fredoka-latin-ext-400.woff2') format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: 'Fredoka'; font-weight: 600; font-display: swap; src: url('/fonts/fredoka-latin-ext-600.woff2') format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: 'Fredoka'; font-weight: 700; font-display: swap; src: url('/fonts/fredoka-latin-ext-700.woff2') format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF; }
/* У Fredoka нет кириллицы — русский текст падает в Nunito, тоже округлый. */
@font-face { font-family: 'Nunito'; font-weight: 400; font-display: swap; src: url('/fonts/nunito-latin-400.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Nunito'; font-weight: 600; font-display: swap; src: url('/fonts/nunito-latin-600.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Nunito'; font-weight: 700; font-display: swap; src: url('/fonts/nunito-latin-700.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Nunito'; font-weight: 400; font-display: swap; src: url('/fonts/nunito-latin-ext-400.woff2') format('woff2'); unicode-range: U+0100-024F; }
@font-face { font-family: 'Nunito'; font-weight: 600; font-display: swap; src: url('/fonts/nunito-latin-ext-600.woff2') format('woff2'); unicode-range: U+0100-024F; }
@font-face { font-family: 'Nunito'; font-weight: 700; font-display: swap; src: url('/fonts/nunito-latin-ext-700.woff2') format('woff2'); unicode-range: U+0100-024F; }
@font-face { font-family: 'Nunito'; font-weight: 400; font-display: swap; src: url('/fonts/nunito-cyrillic-400.woff2') format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Nunito'; font-weight: 600; font-display: swap; src: url('/fonts/nunito-cyrillic-600.woff2') format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Nunito'; font-weight: 700; font-display: swap; src: url('/fonts/nunito-cyrillic-700.woff2') format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Fredoka', 'Nunito', 'Hiragino Sans', 'Yu Gothic', 'PingFang SC', 'Microsoft YaHei', 'Trebuchet MS', sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 60%, #f6fbf4 100%);
  background-attachment: fixed;
  line-height: 1.55;
  /* ::before у .features шириной 100vw: без этого край может дать полосу прокрутки */
  overflow-x: hidden;
}

a { color: var(--green); }
a:hover { color: var(--green-shadow); }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* ── Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 24px 24px;
  text-align: center;
}

.hero-inner { position: relative; max-width: 640px; margin: 0 auto; }

/* Парящие камни и искры в небе. Планы глубины: fg-0 ближний, fg-2 дальний. */
.hero-float { position: absolute; inset: 0; pointer-events: none; }
.float-gem {
  position: absolute;
  animation: float 6s ease-in-out infinite;
  transform: rotate(var(--rot, 0deg));
}
.fg-1 { opacity: 0.9; filter: blur(0.5px); animation-duration: 7s; }
.fg-2 { opacity: 0.65; filter: blur(1.5px); animation-duration: 8s; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-14px) rotate(var(--rot, 0deg)); }
}
.sparkle { position: absolute; animation: twinkle 3.2s ease-in-out infinite; opacity: 0; }
.sparkle svg { display: block; filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.9)); }
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 0.95; transform: scale(1); }
}

/* На узких экранах дальний план попадает на текст — оставляем только ближние камни */
@media (max-width: 640px) {
  .fg-2 { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .float-gem, .sparkle, .glowing img { animation: none; }
  .sparkle { opacity: 0.7; transform: none; }
}

.logo {
  margin: 0;
  font-size: clamp(52px, 10vw, 76px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
}
.logo-shelly { color: var(--green); text-shadow: 0 3px 0 #ffffff; }
.logo-gems { color: var(--blue); text-shadow: 0 3px 0 #ffffff; }

.hero-gems { margin-top: 12px; display: flex; justify-content: center; gap: 8px; }
.hero-gems img { width: 34px; height: 34px; }

.hero-turtle {
  margin-top: 20px;
  width: min(300px, 66vw);
  height: auto;
  filter: drop-shadow(0 14px 16px rgba(43, 36, 64, 0.18));
}

.tagline {
  margin: 22px 0 0;
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 600;
}

.sub {
  margin: 12px auto 0;
  max-width: 520px;
  color: var(--soft);
  font-size: 17px;
}

.badge-soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 16px 30px;
  border-radius: 30px;
  font-size: 19px;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(180deg, var(--green-light) 0%, var(--green) 100%);
  box-shadow: 0 6px 0 var(--green-shadow), 0 12px 18px rgba(43, 36, 64, 0.2);
}

/* ── Мокап телефона с игровым полем */
.gameplay {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 34px 24px 10px;
}

.phone {
  background: var(--ink);
  border-radius: 46px;
  padding: 12px;
  box-shadow: 0 26px 50px rgba(43, 36, 64, 0.32);
  transform: rotate(-3deg);
}

.screen {
  width: 280px;
  border-radius: 36px;
  overflow: hidden;
  background: url('/img/bg_game.jpg') center top / cover, var(--sky-top);
  padding: 20px 14px 18px;
}

.mock-top { display: flex; justify-content: center; gap: 8px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--soft);
  box-shadow: 0 3px 0 rgba(93, 84, 120, 0.2);
}
.pill img { display: block; }
.pill-level {
  background: linear-gradient(180deg, var(--green-light) 0%, var(--green) 100%);
  color: #ffffff;
  box-shadow: 0 3px 0 var(--green-shadow);
}

.mock-board {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  /* панель под полем, как в игре: без неё клетки тонут в облаках фона */
  background: rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  padding: 8px;
}
.mock-cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: 22%;
  background: rgba(255, 255, 255, 0.45);
}
.mock-cell img { position: absolute; inset: 7%; width: 86%; height: 86%; }
.glowing img {
  filter: drop-shadow(0 0 9px rgba(255, 210, 62, 1)) drop-shadow(0 0 3px rgba(255, 255, 255, 0.9));
  animation: gemPulse 1.6s ease-in-out infinite;
}
@keyframes gemPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.mock-tools { margin-top: 14px; display: flex; justify-content: center; gap: 10px; }
.tool {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 3px 0 rgba(93, 84, 120, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tool img { display: block; }

/* Камни по бокам мокапа — только на широких экранах */
.gp-gem { position: absolute; display: none; animation: float 7s ease-in-out infinite; }
.gp-left { left: calc(50% - 260px); top: 18%; --rot: -10deg; }
.gp-right { right: calc(50% - 270px); bottom: 14%; --rot: 12deg; animation-delay: 1.4s; }
@media (min-width: 640px) { .gp-gem { display: block; } }

/* Волна-разделитель перед карточками. Заливка волны продолжается градиентом
   ::before в секции карточек — края должны быть вплотную, иначе виден шов. */
.wave { margin-top: 26px; line-height: 0; }
.wave svg { display: block; width: 100%; height: 64px; }
.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 220px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
  z-index: -1;
}

/* ── Feature-карточки */
.features {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 24px 24px;
  display: grid;
  gap: 26px;
}

.card {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 30px 34px;
  border-radius: 28px;
  background: var(--card);
  box-shadow: 0 6px 0 rgba(93, 84, 120, 0.14), 0 16px 30px rgba(43, 36, 64, 0.1);
}
.card-flip { flex-direction: row-reverse; }

.feature-art { flex: 0 0 auto; }
.feature-art img { display: block; width: 200px; height: auto; }

.gem-ladder {
  flex: 0 0 232px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.gem-ladder img { width: 100%; height: auto; }

.feature-text h2 { margin: 0 0 8px; font-size: 24px; font-weight: 600; }
.feature-text p { margin: 0; color: var(--soft); }

@media (max-width: 640px) {
  .card, .card-flip { flex-direction: column; text-align: center; padding: 26px 22px; }
  .feature-art img { width: 170px; }
  .gem-ladder { flex-basis: auto; width: 200px; }
  .gem-ladder img { width: 100%; }
}

/* ── Текстовые страницы (privacy/terms/404) */
.doc { padding: 56px 0 24px; }
.doc .wrap { max-width: 680px; }
.doc h1 { font-size: 36px; font-weight: 700; margin: 18px 0 4px; }
.doc h2 { font-size: 22px; font-weight: 600; margin: 28px 0 6px; }
.doc p { color: var(--soft); margin: 8px 0; }
.doc-updated { font-size: 14px; opacity: 0.8; }
.doc-back { display: inline-block; font-weight: 600; text-decoration: none; }

.notfound .wrap { text-align: center; }
.notfound h1 { font-size: 64px; margin: 8px 0 0; }

/* ── Пляжная панорама над футером */
.beach { max-width: 1060px; margin: 44px auto 0; padding: 0 24px; }
.beach img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 28px;
  box-shadow: 0 6px 0 rgba(93, 84, 120, 0.14), 0 16px 30px rgba(43, 36, 64, 0.12);
}

/* ── Футер */
.footer { margin-top: 24px; padding: 28px 0 40px; text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; }
.footer-links a { font-weight: 600; text-decoration: none; }
.langs { margin-top: 18px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-size: 14px; }
.langs a { color: var(--soft); text-decoration: none; }
.langs a:hover { color: var(--ink); }
.lang-cur { color: var(--ink); font-weight: 700; }
.footer-copy { margin-top: 16px; color: var(--soft); font-size: 14px; }
.footer-copy a { color: inherit; }
