/* ==========================================================================
   NFT Tracker — стили. Ночная сакура.
   Глубокий чёрный, розовый акцент, плотные блоки с толстыми рамками,
   крупная типографика. Анимации — только transform/opacity/filter.
   ========================================================================== */

/* ---------- Шрифт (свой, без Google Fonts) ---------- */
@font-face {
  font-family: "Geologica";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/geologica-cyr.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+2116;
}
@font-face {
  font-family: "Geologica";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/geologica-lat.woff2") format("woff2");
  unicode-range: U+0020-007E, U+00A0, U+00A9, U+00B7, U+2013, U+2014, U+2018, U+2019, U+201C, U+201D, U+2022, U+2026, U+2212;
}

/* ---------- Переменные ---------- */
:root {
  --bg: #070506;
  --ink: #f8eff3;
  --ink-2: rgba(248, 239, 243, .76);
  --mute: #ab9ca3;
  --line: rgba(255, 232, 240, .13);
  --line-2: rgba(255, 232, 240, .28);
  --surface: rgba(21, 13, 17, .84);
  --pink: #f4b6cb;
  --pink-2: #e98aa9;
  --pink-deep: #c2557c;
  --on-pink: #1d0a13;

  --font: "Geologica", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 4.2vw, 56px);
  --maxw: 1280px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --r-lg: 28px;
  --r-md: 18px;
  --bw: 2px;
}

/* ---------- Сброс ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  background: var(--bg);
  color-scheme: dark;
}
body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--pink); color: var(--on-pink); }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 4px; border-radius: 10px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.ico { width: 1.15em; height: 1.15em; flex: none; }

main, .top, .foot { position: relative; z-index: 2; }

/* ---------- Небо: сакура на весь сайт ---------- */
/* Фон фиксирован на весь экран. Высота 100vh (а не 100%): на iPhone при сворачивании панели браузера слой не пересчитывается.
   Три слоя ветвей (canvas рисуются один раз) под контентом смещаются параллаксом из sky.js; лепестки и искры — один canvas над страницей. */
.canopy {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 3.2s ease;
  contain: strict;
}
.canopy.on { opacity: 1; }
.canopy canvas {
  position: absolute;
  display: block;
  pointer-events: none;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.sky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  transition: opacity 2.4s ease;
}
.sky.on { opacity: 1; }

/* ---------- Прогресс прокрутки ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 70; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--pink); transform: scaleX(0); transform-origin: left; }

/* ---------- Экран загрузки ---------- */
.boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity .8s ease, visibility .8s;
}
.boot.done { opacity: 0; visibility: hidden; }
.boot i { display: block; width: 88px; height: 3px; border-radius: 3px; background: var(--pink); transform-origin: left; animation: draw 1.3s var(--ease) infinite; }
@keyframes draw { 0% { transform: scaleX(0); } 70%, 100% { transform: scaleX(1); opacity: .25; } }

/* ---------- Запаска ---------- */
.fallback {
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 80px var(--gutter);
  text-align: center;
  place-content: center;
  gap: 18px;
  position: relative;
  z-index: 3;
}
.fallback.show { display: grid; }
.fallback h1 { font-size: 2.6rem; font-weight: 600; letter-spacing: -.03em; }
.fallback p { color: var(--mute); max-width: 420px; margin: 0 auto; }

/* ---------- Общее ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Шапка ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: env(safe-area-inset-top);
  border-bottom: var(--bw) solid transparent;
  transition: background-color .5s ease, border-color .5s ease;
}
.top.scrolled {
  background: rgba(7, 5, 6, .8);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.top__in { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; font-size: 1.15rem; font-weight: 600; letter-spacing: -.02em; }
.brand__mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--pink); color: var(--on-pink); }
.brand__mark .ico { width: 22px; height: 22px; }
.nav { display: flex; gap: 2px; padding: 4px; border: var(--bw) solid var(--line); border-radius: 16px; background: var(--surface); }
.nav a { padding: 8px 16px; border-radius: 12px; font-size: .95rem; font-weight: 500; color: var(--ink-2); transition: background-color .4s ease, color .4s ease; }

/* ---------- Кнопки ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 0 24px 0 28px;
  border: var(--bw) solid transparent;
  border-radius: 18px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.01em;
  cursor: pointer;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  transition: transform .45s var(--ease), background-color .45s var(--ease), color .45s var(--ease), border-color .45s var(--ease);
  will-change: transform;
}
.btn .ico { width: 20px; height: 20px; transition: transform .5s var(--ease); }
.btn--solid { background: var(--pink); color: var(--on-pink); }
.btn--line { border-color: var(--line-2); color: var(--ink); }

/* ---------- Hero ---------- */
.hero { overflow-x: clip; }
.hero { padding: 18px 0 clamp(36px, 6vw, 80px); }
.hero__in {
  display: grid;
  gap: 28px;
  grid-template-areas: "head" "stage" "foot";
}
.hero__head { grid-area: head; }
.hero__foot { grid-area: foot; }
.stage { grid-area: stage; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px 9px 14px;
  border: var(--bw) solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  font-size: .9rem;
  font-weight: 500;
}
.dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--pink); }
.dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--pink); animation: ping 2.2s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 75%, 100% { transform: scale(3); opacity: 0; } }

.title {
  margin-top: 26px;
  font-size: clamp(2.7rem, 9.4vw, 5.5rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -.045em;
}
.w { display: inline-block; white-space: nowrap; overflow: hidden; vertical-align: top; padding: .08em .03em .16em; margin: -.08em -.03em -.16em; }
.wi { display: inline-block; }
.wi--accent { color: var(--pink); }
.lead { margin-top: 24px; max-width: 28em; font-size: clamp(1.05rem, .7vw + .9rem, 1.3rem); font-weight: 300; line-height: 1.5; color: var(--ink-2); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.steps li {
  padding: 14px 16px 16px;
  border: var(--bw) solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.25;
}
.steps li b { display: block; margin-bottom: 8px; font-size: 1.5rem; font-weight: 600; letter-spacing: -.03em; color: var(--pink); }

.cta { margin-top: 18px; }
.cta .btn { width: 100%; }

/* ---------- Сцена: сапфир + лента лотов ---------- */
.stage { position: relative; width: 100%; max-width: 560px; margin: 0 auto; aspect-ratio: 1 / 1; }
.stage__in { position: absolute; inset: 0; will-change: transform; }
.pepe { position: absolute; inset: 0; }
.pepe > svg, .pepe > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }

/* ---------- Бегущая строка ---------- */
.marquee {
  margin: clamp(10px, 3vw, 40px) 0 0;
  padding: 20px 0;
  border-block: var(--bw) solid var(--line);
  background: rgba(21, 13, 17, .55);
  overflow: hidden;
  white-space: nowrap;
}
.marquee__track { display: inline-flex; align-items: center; will-change: transform; animation: marquee 46s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item { display: inline-flex; align-items: center; gap: clamp(22px, 3vw, 44px); padding-right: clamp(22px, 3vw, 44px); font-size: clamp(1.3rem, 2.8vw, 2.1rem); font-weight: 600; letter-spacing: -.03em; color: var(--ink-2); }
.marquee__item .ico { width: .8em; height: .8em; color: var(--pink); }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }

/* ---------- Секции ---------- */
.sec { padding-top: clamp(64px, 9vw, 128px); }
.h2 { font-size: clamp(2.2rem, 5.2vw, 4rem); font-weight: 600; line-height: 1.05; letter-spacing: -.04em; }
.sec__head { margin-bottom: clamp(28px, 4vw, 52px); }

/* ---------- Трекеры ---------- */
.plans { display: grid; gap: 20px; }
.plans__slot { display: flex; }
.plan {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 40px);
  border: var(--bw) solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  will-change: transform;
  transition: transform .6s var(--ease), border-color .6s ease;
}
.plan--premium { border-color: rgba(244, 182, 203, .5); }
.plan__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.plan__label { font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; }
.plan__badge { padding: 6px 14px; border-radius: 999px; background: var(--pink); color: var(--on-pink); font-size: .8rem; font-weight: 600; }
.plan--free .plan__badge { background: transparent; border: var(--bw) solid var(--line-2); color: var(--ink-2); padding: 4px 12px; }
.plan__price { margin-top: clamp(26px, 4vw, 48px); display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.plan__price b { font-size: clamp(3.6rem, 7.4vw, 5.6rem); font-weight: 700; line-height: .95; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.plan__price em { font-style: normal; font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 600; letter-spacing: -.03em; color: var(--pink); }
.plan__price--text b { font-size: clamp(2.6rem, 5.4vw, 3.8rem); letter-spacing: -.045em; line-height: 1.1; }
.plan__note { margin-top: 10px; font-size: .95rem; color: var(--mute); }
.plan__lead { margin-top: 22px; font-size: 1.1rem; font-weight: 500; letter-spacing: -.01em; }
.plan__points { margin: 22px 0 30px; flex: 1; align-content: start; display: grid; gap: 10px; }
.plan__points li { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border: var(--bw) solid var(--line); border-radius: 14px; font-size: .98rem; font-weight: 400; }
.plan__points .tick { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--pink); color: var(--on-pink); flex: none; }
.plan__points .tick svg { width: 15px; height: 15px; }
.plan__points .tick path { stroke-dasharray: 24; stroke-dashoffset: 0; }
.plan--free .plan__points .tick { background: transparent; border: var(--bw) solid var(--line-2); color: var(--pink); }
.plan__foot { display: grid; gap: 14px; }
.plan__handle { font-size: .9rem; font-weight: 500; color: var(--mute); }

/* ---------- Поддержка ---------- */
.support__box {
  display: grid;
  gap: 26px;
  padding: clamp(28px, 5vw, 64px);
  border: var(--bw) solid var(--line-2);
  border-radius: 34px;
  background: var(--surface);
}
.support__text { margin-top: 14px; max-width: 28em; color: var(--ink-2); font-size: 1.1rem; font-weight: 300; }
.support__link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  width: fit-content;
  padding: 14px 22px 14px 28px;
  border-radius: 22px;
  background: var(--pink);
  color: var(--on-pink);
  font-size: clamp(1.8rem, 5.4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1;
  will-change: transform;
  transition: transform .45s var(--ease), background-color .45s var(--ease);
}
.support__link .ico { width: .7em; height: .7em; transition: transform .5s var(--ease); }

/* ---------- Подвал ---------- */
.foot { margin-top: clamp(40px, 6vw, 80px); padding: 28px 0 calc(36px + env(safe-area-inset-bottom)); border-top: var(--bw) solid var(--line); font-size: .85rem; color: var(--mute); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* ---------- Hover (только там, где есть настоящее наведение) ---------- */
@media (hover: hover) and (pointer: fine) {
  .nav a:hover { background: rgba(255, 232, 240, .08); color: var(--ink); }
  .btn--solid:hover { background: #ffd2e1; }
  .btn--line:hover { background: rgba(255, 232, 240, .09); border-color: var(--pink); }
  .btn:hover .ico { transform: translate(3px, -3px); }
  .plan:hover { border-color: var(--line-2); }
  .plan--premium:hover { border-color: var(--pink); }
  .support__link:hover { background: #ffd2e1; }
  .support__link:hover .ico { transform: translate(5px, -5px); }
}

/* ---------- Планшет / десктоп ---------- */
@media (min-width: 760px) {
  .plans { grid-template-columns: 1fr 1fr; gap: 24px; }
  .support__box { grid-template-columns: 1fr auto; align-items: center; gap: 40px; }
}
@media (min-width: 980px) {
  .hero { padding-top: 24px; }
  .hero__in {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    grid-template-rows: auto auto;
    grid-template-areas: "head stage" "foot stage";
    column-gap: clamp(24px, 4vw, 64px);
    row-gap: 0;
    align-content: center;
    align-items: center;
    min-height: calc(100vh - 74px - 24px);
    min-height: calc(100svh - 74px - 24px);
  }
  .hero__head { align-self: end; }
  .hero__foot { align-self: start; padding-top: clamp(24px, 3.6vh, 40px); }
  .stage { align-self: center; }
  .title { font-size: clamp(3.2rem, 5.6vw, 5rem); margin-top: 22px; }
  .lead { margin-top: 18px; }
  .steps { max-width: 540px; }
  .cta .btn { width: auto; min-width: 270px; }
  .stage { margin: 0 0 0 auto; max-width: 600px; }
}
@media (max-width: 759px) {
  .stage { max-width: 420px; aspect-ratio: 1 / 1; }
}
@media (max-width: 370px) {
  .brand > span:last-child { display: none; }
}
@media (max-width: 420px) {
  .nav a { padding: 8px 10px; font-size: .86rem; }
  .brand { font-size: 1.05rem; gap: 10px; }
  .steps li { padding: 12px 12px 14px; font-size: .86rem; }
}

/* ---------- Слабые устройства / экономия трафика (класс ставит app.js) ---------- */
.lite .top.scrolled { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(7, 5, 6, .95); }
.lite .marquee__track { animation-duration: 70s; }

/* ---------- Уважение к «уменьшить движение» ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
