@import url('/assets/fonts.css');

:root {
  --ink: #f4effd;
  --ink-2: rgba(232, 222, 255, .72);
  --ink-3: rgba(214, 200, 250, .46);
  --line: rgba(220, 205, 255, .11);
  --line-2: rgba(220, 205, 255, .2);
  --glass: rgba(17, 11, 36, .46);
  --glass-2: rgba(30, 20, 60, .5);
  --violet: #a487f7;
  --violet-2: #c8b6ff;
  --violet-deep: #3b2672;
  --rose: #f1a8c6;
  --gold: #f4d5a0;
  --mint: #a6e6cf;
  --serif: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --r: 22px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5;
  background: #05030c;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  font-feature-settings: 'tnum' 1, 'cv11' 1;
}
.no-gl body, html.no-gl body {
  background:
    radial-gradient(60% 50% at 30% 30%, rgba(120, 80, 200, .35), transparent 70%),
    radial-gradient(50% 40% at 75% 60%, rgba(200, 120, 170, .18), transparent 70%),
    #05030c;
}
::selection { background: rgba(164, 135, 247, .45); color: #fff; }

#space, #dust { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; pointer-events: none; }
#space { z-index: 0; opacity: 0; transition: opacity 2.2s var(--ease); }
#dust { z-index: 1; mix-blend-mode: screen; }
body.ready #space { opacity: 1; }
.page { position: relative; z-index: 2; }

/* курсор */
#cursor-ring, #cursor-dot { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 1000; opacity: 0; transition: opacity .35s; will-change: transform; }
#cursor-ring {
  width: 34px; height: 34px; border-radius: 17px;
  border: 1px solid rgba(214, 198, 255, .55);
  background: radial-gradient(circle, rgba(164, 135, 247, .07), transparent 70%);
  box-shadow: 0 0 22px rgba(164, 135, 247, .14);
  transition: opacity .35s, border-color .3s, background .3s;
}
#cursor-ring.hover { border-color: rgba(236, 226, 255, .35); background: rgba(190, 168, 255, .06); }
#cursor-dot { width: 6px; height: 6px; border-radius: 50%; background: #efe6ff; box-shadow: 0 0 10px rgba(220, 200, 255, .9); }
@media (pointer:fine) {
  body.has-cursor.cursor-on #cursor-ring, body.has-cursor.cursor-on #cursor-dot { opacity: 1; }
  body.has-cursor.cursor-on.cursor-text #cursor-ring { opacity: 0; }
  body.has-cursor.cursor-on.cursor-text #cursor-dot { opacity: .35; }
  body.has-cursor, body.has-cursor a, body.has-cursor button, body.has-cursor label, body.has-cursor summary { cursor: none; }
}
[data-motion="off"] #cursor-ring { transition: none; }

/* общие */
[data-magnetic] { transform: translate3d(var(--mx, 0), var(--my, 0), 0); }
.glass {
  position: relative; background: var(--glass); border: 1px solid var(--line); border-radius: var(--r);
  backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .05);
}
[data-tilt] {
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s var(--ease);
}
[data-tilt]::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; padding: 1px;
  background: radial-gradient(420px circle at var(--lx, 50%) var(--ly, 0%), rgba(214, 196, 255, .5), rgba(214, 196, 255, .05) 45%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .9;
}
[data-tilt]::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(600px circle at var(--lx, 50%) var(--ly, 0%), rgba(180, 150, 255, .07), transparent 60%);
}

.reveal { opacity: 0; transform: translateY(26px); filter: blur(8px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease), filter 1.1s var(--ease); }
.reveal.in { opacity: 1; transform: none; filter: none; }
[data-motion="off"] .reveal { opacity: 1; transform: none; filter: none; transition: none; }

.serif { font-family: var(--serif); }
.eyebrow { font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--ink-3); margin: 0; }

.btn {
  --bg: rgba(164, 135, 247, .14);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--bg); color: var(--ink); font: 600 14px/1 var(--sans); letter-spacing: .01em;
  text-decoration: none; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: background .3s, border-color .3s, box-shadow .4s, color .3s, transform .5s var(--spring);
  transform: translate3d(var(--mx, 0), var(--my, 0), 0);
}
.btn:hover { --bg: rgba(164, 135, 247, .24); border-color: rgba(214, 196, 255, .38); box-shadow: 0 10px 30px -10px rgba(140, 100, 240, .55); }
.btn:active { transform: translate3d(var(--mx, 0), var(--my, 0), 0) scale(.96); transition-duration: .1s; }
.btn.solid { --bg: linear-gradient(135deg, #b39af9, #8a6be6); background: var(--bg); color: #170d33; border-color: transparent; }
.btn.solid:hover { box-shadow: 0 14px 40px -12px rgba(160, 120, 255, .8); filter: brightness(1.06); }
.btn.ghost { --bg: transparent; }
.btn.small { min-height: 34px; padding: 0 13px; font-size: 13px; }
.btn.icon { width: 44px; padding: 0; }
.btn.icon.small { width: 34px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn[disabled] { opacity: .35; pointer-events: none; }
button { font: inherit; color: inherit; }

/* орбита прокрутки */
#orbit {
  position: fixed; right: 18px; top: 50%; height: 34vh; width: 14px; transform: translateY(-50%); z-index: 5; pointer-events: none;
}
#orbit::before { content: ''; position: absolute; left: 6px; top: 0; bottom: 0; width: 1px; background: linear-gradient(transparent, var(--line-2) 15%, var(--line-2) 85%, transparent); }
#orbit i {
  position: absolute; left: 1px; top: calc(var(--p, 0) * (100% - 12px)); width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #c9b6ff 45%, #6c4fc4);
  box-shadow: 0 0 14px rgba(190, 168, 255, .7);
}
@media (max-width: 720px) { #orbit { display: none; } }

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