/* ============================================================
   snyapik.club — тропа странника (Снусмумрик)
   палитра: лесной мох + охра-перо + небо, тёплая бумага
   единственный «природный» сайт серии, антипод геймерским
   ============================================================ */

:root {
  --bg: #1b251d;
  --bg-2: #223024;
  --paper: #efe6d2;
  --paper-dim: #cdbf9f;
  --ink: #f0ead9;
  --ink-dim: #a8b39a;
  --moss: #4f8a5b;
  --moss-bright: #6fb678;
  --ochre: #e0a83b;
  --ochre-bright: #f4c15a;
  --sky: #7fb4d4;
  --berry: #c8584e;

  /* бренды */
  --c-tiktok: #25f4ee;
  --c-telegram: #2aabee;
  --c-discord: #5865f2;
  --c-youtube: #ff5252;
  --c-donate: #ff8a3c;

  /* BUL$ Opti */
  --buls-bg: #020617;
  --buls-indigo: #6366f1;
  --buls-violet: #8b5cf6;
  --buls-blurple: #5865f2;

  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-body: 'Onest', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --card-r: 22px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--font-mono); }
::selection { background: var(--ochre); color: #2a2113; }

/* ---------- фоновые слои ---------- */

#bg3d { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }

.haze {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 110% 80% at 50% -5%, rgba(127, 180, 212, .12), transparent 55%),
    radial-gradient(ellipse 90% 70% at 50% 108%, rgba(15, 22, 16, .65), transparent 60%);
}

.grain {
  position: fixed; inset: -10%; z-index: 2; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 8s steps(10) infinite;
}
@keyframes grain-shift {
  0%,100% { transform: translate(0,0); } 20% { transform: translate(-3%,2%); }
  40% { transform: translate(2%,-3%); } 60% { transform: translate(-2%,-2%); } 80% { transform: translate(3%,3%); }
}

/* ---------- курсор ---------- */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none;
  border-radius: 50%; opacity: 0; transform: translate(-50%, -50%);
}
.cursor-dot { width: 6px; height: 6px; background: var(--ochre-bright); }
.cursor-ring { width: 32px; height: 32px; border: 1px solid rgba(244, 193, 90, .5);
  transition: width .25s var(--ease-out), height .25s var(--ease-out), border-color .25s; }
body.cursor-on .cursor-dot, body.cursor-on .cursor-ring { opacity: 1; }
body.cursor-on, body.cursor-on a, body.cursor-on button { cursor: none; }
body.cursor-hover .cursor-ring { width: 50px; height: 50px; border-color: var(--moss-bright); }

/* ---------- колонка ---------- */
.page {
  position: relative; z-index: 3; max-width: 540px; margin: 0 auto;
  padding: clamp(40px, 8vh, 84px) max(20px, env(safe-area-inset-right))
    calc(48px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  display: flex; flex-direction: column; gap: 18px;
}

:focus-visible { outline: 2px solid var(--ochre-bright); outline-offset: 3px; border-radius: 4px; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- HERO ---------- */
.hero { text-align: center; padding-bottom: 6px; }

.avatar-wrap { position: relative; width: 124px; height: 124px; margin: 0 auto 22px; }
.avatar {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block;
  border: 3px solid var(--paper); position: relative; z-index: 1;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.6);
}
.avatar-ring {
  position: absolute; inset: -10px; border-radius: 50%; border: 2px dashed rgba(111, 182, 120, .55);
  animation: ring-spin 26s linear infinite;
}
@keyframes ring-spin { to { transform: rotate(360deg); } }
.avatar-wrap::after {
  content: ''; position: absolute; inset: -34px; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(244, 193, 90, .5), rgba(111, 182, 120, .2) 45%, transparent 72%);
  filter: blur(6px);
  animation: avatar-glow 3.6s ease-in-out infinite;
}
@keyframes avatar-glow {
  0%, 100% { opacity: .6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}
.feather {
  position: absolute; right: 2px; top: 2px; z-index: 2; font-size: 1.5rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.4));
  animation: sway 4s ease-in-out infinite;
}
@keyframes sway { 0%,100% { transform: rotate(-8deg); } 50% { transform: rotate(10deg); } }

.name {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(2.1rem, 9vw, 3rem);
  letter-spacing: -.01em; line-height: 1.05; color: var(--paper);
}
.handle { margin-top: 6px; }
.handle .mono { color: var(--ochre-bright); font-size: .9rem; letter-spacing: .02em; }

.bio { margin-top: 14px; font-size: 1.02rem; font-weight: 500; color: var(--ink); font-style: italic; }

.chips { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .02em; padding: 7px 14px;
  border-radius: 100px; border: 1px solid rgba(239, 230, 210, .16); background: rgba(34, 48, 36, .6);
  color: var(--ink-dim); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.chip--hot { border-color: rgba(224, 168, 59, .45); color: var(--ochre-bright); background: rgba(224, 168, 59, .1); }

/* ---------- STATS ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid rgba(239, 230, 210, .14); border-radius: var(--card-r);
  background: rgba(34, 48, 36, .55); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); overflow: hidden;
}
.stat { padding: 18px 6px 16px; text-align: center; position: relative; }
.stat + .stat::before { content: ''; position: absolute; left: 0; top: 22%; height: 56%; width: 1px; background: rgba(239, 230, 210, .12); }
.stat-num { display: block; font-size: clamp(1.05rem, 4.6vw, 1.35rem); font-weight: 700; color: var(--paper); }
.stat-label { display: block; margin-top: 3px; font-size: .68rem; letter-spacing: .04em; color: var(--ink-dim); }

/* ---------- TRAIL ---------- */
.trail { position: relative; display: flex; flex-direction: column; gap: 14px; padding-left: 30px; }
.trail-line {
  position: absolute; left: 13px; top: 8px; bottom: 8px; width: 2px;
  background: repeating-linear-gradient(var(--moss) 0 6px, transparent 6px 13px);
  opacity: .5;
}

.stop {
  position: relative; display: flex; align-items: center; gap: 15px; padding: 16px 18px;
  border-radius: 18px; text-decoration: none; color: var(--ink);
  border: 1px solid rgba(239, 230, 210, .12); background: rgba(34, 48, 36, .6);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform .35s var(--ease-out), border-color .3s, box-shadow .3s, background .3s;
}
.stop-dot {
  position: absolute; left: -23px; top: 50%; width: 13px; height: 13px; margin-top: -6.5px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--moss-bright); transition: background .3s, border-color .3s, transform .3s;
}
.stop:hover { transform: translateX(4px); border-color: rgba(111, 182, 120, .4); box-shadow: 0 10px 30px -14px rgba(0,0,0,.7); }
.stop:hover .stop-dot { background: var(--ochre); border-color: var(--ochre-bright); transform: scale(1.25); }

.stop-icon {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(239, 230, 210, .06); border: 1px solid rgba(239, 230, 210, .1); color: var(--paper);
  transition: transform .35s var(--ease-out), color .3s, border-color .3s;
}
.stop-icon svg { width: 21px; height: 21px; }
.stop:hover .stop-icon { transform: rotate(-5deg) scale(1.06); }
.stop-body { flex: 1 1 auto; min-width: 0; }
.stop-title { display: block; font-family: var(--font-display); font-weight: 700; font-size: .94rem; }
.stop-sub { display: block; margin-top: 2px; font-size: .78rem; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stop-meta { flex: 0 0 auto; font-size: .8rem; color: var(--ink-dim); transition: color .3s; }

.stop[data-brand="tiktok"]:hover .stop-icon { color: var(--c-tiktok); }
.stop[data-brand="telegram"]:hover .stop-icon { color: var(--c-telegram); }
.stop[data-brand="discord"]:hover .stop-icon { color: var(--c-discord); }
.stop[data-brand="youtube"]:hover .stop-icon { color: var(--c-youtube); }
.stop[data-brand="donate"]:hover .stop-icon { color: var(--c-donate); }
.stop:hover .stop-meta { color: var(--ochre-bright); }

/* ---------- общие карточки ---------- */
.card {
  position: relative; border: 1px solid rgba(239, 230, 210, .14); border-radius: var(--card-r);
  background: rgba(34, 48, 36, .6); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}

/* ---------- JOURNAL ---------- */
.journal {
  background:
    linear-gradient(rgba(239, 230, 210, .03) 0 0) padding-box,
    rgba(34, 48, 36, .7);
  overflow: hidden;
}
.journal-head {
  display: flex; align-items: center; gap: 12px; padding: 16px 22px 14px;
  border-bottom: 1px dashed rgba(239, 230, 210, .18);
}
.journal-clip { width: 26px; height: 10px; border-radius: 6px; background: var(--ochre); box-shadow: 0 2px 5px rgba(0,0,0,.4); }
.section-title {
  font-family: var(--font-display); font-weight: 700; font-size: .92rem; letter-spacing: .01em; color: var(--paper);
}
.journal-page { margin-left: auto; font-size: .68rem; color: var(--ink-dim); letter-spacing: .06em; }

.journal-body { padding: 16px 22px 20px; }
.jline { display: flex; align-items: baseline; gap: 8px; font-size: .9rem; line-height: 2; }
.jkey { color: var(--ink-dim); font-family: var(--font-mono); font-size: .82rem; }
.jdot { flex: 1 1 auto; border-bottom: 1px dotted rgba(239, 230, 210, .3); transform: translateY(-3px); }
.jval { color: var(--paper); font-weight: 500; }
.jhint { margin-top: 12px; font-size: .8rem; color: var(--moss-bright); font-style: italic; }

/* ---------- BUL$ OPTI ---------- */
.buls {
  background:
    radial-gradient(120% 140% at 85% -20%, rgba(99, 102, 241, .22), transparent 55%),
    var(--buls-bg);
  border-color: rgba(99, 102, 241, .3); color: #e2e8f0; padding: 26px 24px 24px; overflow: hidden; margin-top: 6px;
}
.buls::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background-image: linear-gradient(rgba(99,102,241,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(99,102,241,.06) 1px, transparent 1px);
  background-size: 28px 28px; mask-image: radial-gradient(120% 100% at 50% 0%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, black 30%, transparent 80%);
}
.buls > * { position: relative; }
.buls-tag {
  display: inline-block; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, .35); background: rgba(99, 102, 241, .1); padding: 5px 12px; border-radius: 100px; margin-bottom: 16px;
}
.buls-brand { font-family: var(--font-display); font-weight: 900; font-size: clamp(1.5rem, 6.4vw, 1.9rem); line-height: 1.1; color: #fff; }
.buls-s { color: var(--buls-indigo); }
.buls-opti { background: linear-gradient(100deg, var(--buls-indigo), var(--buls-violet)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.buls-slogan { margin-top: 10px; font-family: var(--font-display); font-weight: 700; font-size: .9rem; letter-spacing: .03em; text-transform: uppercase; color: #c7d2fe; }
.buls-text { margin-top: 10px; font-size: .88rem; color: #94a3b8; line-height: 1.6; }
.buls-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.bstat { text-align: center; padding: 12px 6px; border-radius: 14px; background: rgba(11, 17, 33, .85); border: 1px solid rgba(99, 102, 241, .18); }
.bstat-num { display: block; font-weight: 700; font-size: 1.02rem; color: #fff; }
.bstat:first-child .bstat-num { color: #34d399; }
.bstat:last-child .bstat-num { color: #fcd34d; }
.bstat-label { display: block; margin-top: 2px; font-size: .64rem; letter-spacing: .04em; color: #94a3b8; }
.buls-actions { display: flex; gap: 10px; margin-top: 20px; }
.btn {
  flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 18px;
  border-radius: 14px; font-family: var(--font-display); font-weight: 700; font-size: .78rem; letter-spacing: .04em; text-decoration: none;
  transition: transform .2s var(--ease-out), box-shadow .3s, background .3s, border-color .3s;
}
.btn--buls { color: #fff; background: linear-gradient(120deg, var(--buls-indigo), var(--buls-violet)); box-shadow: 0 8px 28px -8px rgba(99, 102, 241, .55); }
.btn--buls:hover { transform: translateY(-2px); box-shadow: 0 14px 36px -8px rgba(99, 102, 241, .7); }
.btn--ghost { flex: 0 1 auto; color: #c7d2fe; border: 1px solid rgba(88, 101, 242, .45); background: rgba(88, 101, 242, .1); }
.btn--ghost:hover { background: rgba(88, 101, 242, .22); border-color: var(--buls-blurple); transform: translateY(-2px); }

/* ---------- FOOTER ---------- */
.footer { text-align: center; padding: 22px 0 10px; font-size: .78rem; color: var(--ink-dim); }
.footer-domain { font-size: .82rem; letter-spacing: .14em; color: var(--ochre-bright); margin-bottom: 8px; }
.footer-line a, .footer-credit a { display: inline-block; padding: 6px 4px; margin: -2px 0; }
.footer-line a { color: var(--ink); text-decoration: none; border-bottom: 1px solid rgba(224, 168, 59, .4); }
.footer-line a:hover { color: var(--ochre-bright); }
.footer-credit { margin-top: 6px; font-size: .72rem; color: #8f9a86; }
.footer-credit a { color: #a5b4fc; text-decoration: none; }

/* ---------- адаптив ---------- */
@media (max-width: 420px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3)::before { display: none; }
  .stat:nth-child(n+3) { border-top: 1px solid rgba(239, 230, 210, .12); }
  .stop-meta { display: none; }
  .buls-actions { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
