/* ============================================================
   NOXWAVE STUDIO — base.css
   Переменные, reset, типографика, глобальные утилиты
   ============================================================ */

/* ---------- Переменные ---------- */
:root {
  /* Палитра */
  --bg: #05060b;
  --surface: #0a0d15;
  --surface-2: #0e1320;
  --surface-3: #101827;

  --line: rgba(150, 180, 255, .13);
  --line-strong: rgba(150, 180, 255, .25);

  --text: #f3f7ff;
  --text-muted: #8792a8;
  --text-dim: #566176;
  --text-soft: #6d7890;

  --blue: #237dff;
  --blue-deep: #1266dc;
  --cyan: #00d9ff;
  --cyan-soft: #4bbdff;

  --green: #2ee6a6;
  --warn: #ffb547;
  --danger: #ff5470;

  /* Размеры */
  --max: 1240px;
  --gutter: 56px;
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;

  /* Тайминги */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --t-fast: .2s;
  --t: .3s;
  --t-slow: .5s;

  /* Тени */
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, .35);
  --shadow: 0 20px 60px rgba(0, 0, 0, .45);
  --shadow-blue: 0 10px 40px rgba(0, 120, 255, .18);
  --shadow-blue-lg: 0 15px 50px rgba(0, 160, 255, .28);

  /* Шрифт */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t) var(--ease);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

input,
textarea,
select {
  font: inherit;
  color: inherit;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: rgba(35, 125, 255, .35);
  color: #fff;
}

/* ---------- Скроллбар ---------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #05060b;
}

::-webkit-scrollbar-thumb {
  background: #1a2235;
  border: 2px solid #05060b;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #26324a;
}

/* ---------- Фон и шум ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 75% 12%, rgba(0, 119, 255, .10), transparent 27%),
    radial-gradient(circle at 15% 70%, rgba(31, 52, 180, .08), transparent 30%);
  z-index: -2;
}

.noise {
  position: fixed;
  inset: 0;
  opacity: .035;
  pointer-events: none;
  z-index: 50;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Курсор ---------- */
.cursor-dot,
.cursor-ring {
  position: fixed;
  pointer-events: none;
  z-index: 2000;
  transform: translate(-50%, -50%);
}

.cursor-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
}

.cursor-ring {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(70, 190, 255, .7);
  border-radius: 50%;
  transition: width var(--t-fast), height var(--t-fast), background var(--t-fast);
}

.cursor-ring.active {
  width: 50px;
  height: 50px;
  background: rgba(0, 180, 255, .07);
}

/* ---------- Типографика (утилиты) ---------- */
.section-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.4px;
  color: var(--text-soft);
  text-transform: uppercase;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 2.4px;
  color: var(--text-soft);
  font-weight: 700;
  text-transform: uppercase;
}

.eyebrow i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 14px var(--cyan);
  margin-right: 10px;
  vertical-align: middle;
}

.text-link {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color var(--t) var(--ease), color var(--t) var(--ease);
}

.text-link span {
  margin-left: 15px;
  color: var(--cyan);
}

.text-link:hover {
  border-color: var(--line-strong);
}

/* ---------- Утилиты ---------- */
.section {
  width: min(calc(100% - var(--gutter)), var(--max));
  margin: auto;
  padding: 130px 0;
}

.magnetic {
  will-change: transform;
}

/* ---------- Reveal-анимация ---------- */
.reveal {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}

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

/* ---------- Keyframes ---------- */
@keyframes load {
  to { transform: translateX(400%); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes float {
  50% { transform: translateY(-12px) rotate(2deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.85); }
}

/* ---------- Адаптив (только то, что глобально) ---------- */
@media (max-width: 850px) {
  :root {
    --gutter: 30px;
  }

  .section {
    padding: 90px 0;
  }

  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}

@media (max-width: 520px) {
  :root {
    --gutter: 30px;
  }
}

/* ---------- Печать ---------- */
@media print {
  body::before,
  .noise,
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
/* ---------- Загрузчик ---------- */
.loader {
  position: fixed;
  inset: 0;
  background: #03040a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 1000;
  transition: opacity .8s ease;
}

.loader.hide {
  opacity: 0;
  pointer-events: none;
}

.loader img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  filter: drop-shadow(0 0 30px rgba(0, 180, 255, .35));
}

.loader-line {
  width: 180px;
  height: 2px;
  background: #141b29;
  margin-top: 28px;
  overflow: hidden;
}

.loader-line span {
  display: block;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  animation: load 1.1s ease infinite;
}

.loader small {
  margin-top: 12px;
  color: #566176;
  font-size: 9px;
  letter-spacing: 2px;
}

@keyframes load {
  to { transform: translateX(400%); }
}