/* =========================================================
   MewProg — базовые стили
   Этап 1: сброс, типографика, контейнеры, базовая раскладка.
   Маскот/tilt/тёмная тема/курсор добавляются на следующих этапах.
   ========================================================= */

:root {
  /* Тёмная база + неоновый розово-алый акцент */
  --bg: #0E0A13;
  --bg-alt: #171020;
  --card-bg: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.14);

  --text: #F5F1F7;
  --text-soft: #C9C0D6;
  --text-faint: #948BA3;

  --accent: #FF3B6B;
  --accent-soft: rgba(255, 59, 107, 0.18);
  --accent-contrast: #FFFFFF;

  --neon-violet: #A66BFF;
  --neon-mint: #46E0B0;
  --neon-sky: #4FC3F7;

  /* оставлено для обратной совместимости декоративных float-акцентов */
  --pastel-lavender: var(--neon-violet);
  --pastel-mint: var(--neon-mint);
  --pastel-sky: var(--neon-sky);

  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;

  --shadow-card: 0 8px 28px -8px rgba(0, 0, 0, 0.55);
  --shadow-soft: 0 4px 18px -6px rgba(0, 0, 0, 0.45);

  --container-w: 1120px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  color-scheme: dark;
}

/* ---------- Сброс ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { padding-left: 1.2em; }
button { font: inherit; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 800; }
p { margin: 0 0 1em; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 10px 16px;
  border-radius: var(--radius-s);
  z-index: 1000;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-soft);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
}
.logo__mark { border-radius: 50%; }
.site-nav {
  display: flex;
  gap: 28px;
}
.site-nav a {
  font-weight: 600;
  color: var(--text-soft);
  transition: color 0.2s ease;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent);
}

/* ---------- Section basics ---------- */
main section {
  padding: 76px 0;
}
.section-title {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  text-align: center;
  margin-bottom: 10px;
}
.section-subtitle {
  text-align: center;
  color: var(--text-soft);
  max-width: 520px;
  margin: 0 auto 36px;
}

/* ---------- Появление при скролле ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- Hero ---------- */
.hero {
  padding-top: 56px;
  padding-bottom: 48px;
  text-align: center;
  background:
    radial-gradient(60vmax 44vmax at 18% 10%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 60%),
    radial-gradient(50vmax 40vmax at 85% 18%, color-mix(in srgb, var(--neon-violet) 16%, transparent), transparent 60%),
    var(--bg);
  position: relative;
  overflow: hidden;
}
.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}

/* лёгкие плавающие акценты фона */
.hero__float {
  position: absolute;
  z-index: 1;
  width: clamp(30px, 4.5vw, 46px);
  pointer-events: none;
  opacity: 0.6;
  animation: heroFloatBob 7s ease-in-out infinite;
}
.hero__float svg { display: block; width: 100%; height: auto; }
.hero__float--a { top: 14%; left: 8%; animation-delay: -1s; }
.hero__float--b { top: 20%; right: 9%; animation-delay: -3.4s; }
.hero__float--c { bottom: 12%; left: 14%; animation-delay: -5s; }
@keyframes heroFloatBob { 50% { transform: translateY(-12px) rotate(6deg); } }
@media (max-width: 640px) { .hero__float { opacity: 0.4; } }

/* маскот: значок-артворк кота — лёгкое покачивание, пульсирующее свечение, наклон за курсором */
.hero__mascot-wrap {
  width: min(300px, 62vw);
  margin-bottom: 4px;
  perspective: 700px;
  animation: mascotBob 6s ease-in-out infinite;
}
.mascot-tilt {
  transition: transform 0.2s ease-out;
  will-change: transform;
}
.mascot {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0;
  animation:
    mascotPopIn 0.6s var(--ease) forwards,
    mascotGlowPulse 3.2s ease-in-out 0.6s infinite;
}
@keyframes mascotBob {
  50% { transform: translateY(-10px); }
}
@keyframes mascotPopIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes mascotGlowPulse {
  0%, 100% { filter: drop-shadow(0 0 22px rgba(255, 59, 107, 0.4)) drop-shadow(0 14px 20px rgba(0, 0, 0, 0.55)); }
  50% { filter: drop-shadow(0 0 40px rgba(255, 59, 107, 0.65)) drop-shadow(0 14px 20px rgba(0, 0, 0, 0.55)); }
}

/* появление заголовка, слогана и кнопок хero */
.hero-fade {
  opacity: 0;
  transform: translateY(16px);
  animation: heroFadeIn 0.7s var(--ease) forwards;
}
@keyframes heroFadeIn { to { opacity: 1; transform: none; } }

.hero__title {
  font-size: clamp(2.4rem, 6.4vw, 3.8rem);
  letter-spacing: -0.02em;
}
.hero__slogan {
  font-size: clamp(1.02rem, 2.2vw, 1.28rem);
  color: var(--text-soft);
  margin-top: 10px;
  margin-bottom: 28px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 28px;
}
.hero__scroll {
  display: inline-flex;
}
.hero__scroll-icon {
  width: 22px;
  height: 34px;
  border: 2px solid var(--text-faint);
  border-radius: 12px;
  position: relative;
}
.hero__scroll-icon::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollDot 1.6s ease infinite;
}
@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  transition: transform 0.2s var(--ease), box-shadow 0.25s ease, border-color 0.25s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 10px 26px -10px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn-primary:hover, .btn-primary:focus-visible {
  box-shadow: 0 14px 32px -8px color-mix(in srgb, var(--accent) 80%, transparent);
  transform: translateY(-2px);
}
.btn-ghost {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover, .btn-ghost:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.magnetic { transition: transform 0.2s ease-out; will-change: transform; }

/* ---------- Apps ---------- */
.apps__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  max-width: 900px;
  margin: 0 auto;
}
.app-card {
  position: relative;
  background:
    radial-gradient(360px circle at var(--mx, 30%) var(--my, 0%), color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%),
    var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-card);
  padding: 28px 26px;
  text-align: left;
  will-change: transform;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.app-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.app-card__icon {
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: var(--radius-m);
  overflow: hidden;
}
.app-card__title {
  font-size: 1.2rem;
}
.app-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}
.tag--soon { background: var(--accent-soft); color: var(--accent); }
.tag--progress { background: color-mix(in srgb, var(--neon-mint) 18%, transparent); color: var(--neon-mint); }
.tag--live { background: color-mix(in srgb, var(--neon-sky) 18%, transparent); color: var(--neon-sky); }

.app-card__desc {
  color: var(--text-soft);
  font-size: 0.95rem;
  margin-bottom: 14px;
}
.app-card__feats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.app-card__feats li {
  position: relative;
  padding-left: 20px;
  color: var(--text-soft);
  font-size: 0.92rem;
}
.app-card__feats li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  rotate: 45deg;
}

/* ---------- About ---------- */
.about__inner { max-width: 680px; }
.about__text p { color: var(--text-soft); }

/* ---------- Contacts ---------- */
.contacts__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 32px;
}
.contact-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 18px 26px;
  box-shadow: var(--shadow-soft);
  min-width: 240px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.contact-btn:hover,
.contact-btn:focus-visible {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-card);
}
.contact-btn__icon { font-size: 1.6rem; }
.contact-btn__text { display: flex; flex-direction: column; text-align: left; }
.contact-btn__label { font-size: 0.8rem; color: var(--text-faint); }
.contact-btn__value { font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 32px 0;
}
.site-footer__inner {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-faint);
}
.site-footer__legal-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.site-footer__legal-links a {
  color: var(--text-soft);
  font-weight: 600;
}
.site-footer__legal-links a:hover { color: var(--accent); }
.site-footer__requisites { margin-bottom: 8px; line-height: 1.5; }
.site-footer__copyright { margin: 0; }

/* ---------- Legal pages ---------- */
.legal-page { padding: 64px 0 96px; }
.legal-page__inner { max-width: 680px; }
.legal-page__title { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 8px; }
.legal-page__updated { color: var(--text-faint); font-size: 0.9rem; margin-bottom: 32px; }
.legal-page h2 { font-size: 1.25rem; margin-top: 2em; margin-bottom: 0.6em; }
.legal-page h3 { font-size: 1.05rem; margin-top: 1.4em; margin-bottom: 0.5em; }
.legal-page p, .legal-page li { color: var(--text-soft); }
.legal-page a { color: var(--accent); text-decoration: underline; }

/* ---------- Курсор-лапка на интерактивных элементах ---------- */
:root {
  --cursor-paw: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'><g fill='%23FF3B6B'><ellipse cx='14' cy='18.5' rx='7.2' ry='6'/><ellipse cx='5.5' cy='9' rx='3' ry='4'/><ellipse cx='12.5' cy='5.5' rx='3' ry='4'/><ellipse cx='20' cy='8.5' rx='3' ry='4'/></g></svg>") 14 14, pointer;
}

a, button,
.app-card,
.contact-btn,
.hero__scroll,
.logo,
.site-nav a {
  cursor: var(--cursor-paw);
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  main section { padding: 56px 0; }
  .site-nav { gap: 16px; font-size: 0.9rem; }
  .contact-btn { min-width: 100%; }
  .app-card { text-align: left; }
}

@media (max-width: 480px) {
  .site-header__inner {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 0;
    justify-content: center;
    gap: 8px;
  }
  .site-nav { gap: 12px; font-size: 0.8rem; }
  .logo__text { font-size: 1rem; }
  .hero { padding-top: 36px; }
  main section { padding: 42px 0; }
  .hero__float { display: none; }
}

/* ---------- Меньше движения ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .hero__mascot-wrap { animation: none; }
  .mascot { animation: none; opacity: 1; filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.55)); }
  .mascot-tilt { transition: none; }
  .hero-fade { animation: none; opacity: 1; transform: none; }
  .hero__float { animation: none; }
  .hero__scroll-icon::after { animation: none; }

  .reveal { opacity: 1; transform: none; transition: none; }

  .magnetic { transition: none; }
  .app-card, .btn { transition: none; }
}
