/* =========================================================================
   DivoDivo — дизайн-система «Персиковое облако»
   Слой 1: токены, холст, базовая типографика
   ========================================================================= */

:root {
  color-scheme: light;

  /* --- облака / фон --- */
  --cloud-0: #fffdfc;
  --cloud-1: #fff8f4;
  --cloud-2: #ffefe9;
  --cloud-3: #ffe5e8;

  /* --- персик --- */
  --peach-50: #fff5ec;
  --peach-100: #ffe9da;
  --peach-200: #ffd8bf;
  --peach-300: #ffc19f;
  --peach-400: #ffa980;
  --peach-500: #ff9366;

  /* --- роза --- */
  --rose-50: #fff3f7;
  --rose-100: #ffe5ee;
  --rose-200: #ffcbdd;
  --rose-300: #fbaac7;
  --rose-400: #f68db2;
  --rose-500: #ee739b;
  --rose-600: #dd5a86;

  /* --- сирень (акцент глубины) --- */
  --lilac-100: #f5eeff;
  --lilac-200: #e7dbff;
  --lilac-300: #d3bcff;

  /* --- чернила --- */
  --ink: #4b3341;
  --ink-strong: #37232f;
  --ink-soft: rgba(75, 51, 65, 0.66);
  --ink-dim: rgba(75, 51, 65, 0.5);
  --ink-faint: rgba(75, 51, 65, 0.36);

  /* --- совместимость со старыми токенами --- */
  --bg: var(--cloud-1);
  --bg-panel: rgba(255, 255, 255, 0.74);
  --bg-soft: rgba(255, 255, 255, 0.58);
  --bg-elevated: #ffffff;
  --border: rgba(240, 168, 192, 0.28);
  --text: #4b3341;
  --text-soft: rgba(75, 51, 65, 0.66);
  --text-dim: rgba(75, 51, 65, 0.45);
  --accent-start: #ffb489;
  --accent-end: #f78bb2;
  --accent-violet: #c9a6ff;
  --shadow: 0 26px 70px rgba(214, 132, 163, 0.16);

  /* --- поверхности --- */
  --glass: rgba(255, 255, 255, 0.74);
  --glass-strong: rgba(255, 255, 255, 0.9);
  --glass-soft: rgba(255, 255, 255, 0.5);
  --glass-tint: rgba(255, 244, 240, 0.7);
  --line: rgba(240, 168, 192, 0.28);
  --line-strong: rgba(238, 149, 178, 0.42);
  --line-light: rgba(255, 255, 255, 0.8);

  /* --- градиенты --- */
  /* заливка под белый текст — насыщённее, чтобы читалось контрастно */
  --grad-accent: linear-gradient(135deg, #ff9d6b 0%, #f9798f 46%, #e968b6 100%);
  --grad-accent-hover: linear-gradient(135deg, #ffa87a 0%, #fb849a 46%, #ef76c0 100%);
  /* мягкая пастельная заливка под тёмный текст */
  --grad-pastel: linear-gradient(135deg, #ffc79e 0%, #ffa5a5 46%, #f78bc4 100%);
  --grad-accent-soft: linear-gradient(135deg, rgba(255, 199, 158, 0.28), rgba(247, 139, 196, 0.24));
  --grad-text: linear-gradient(120deg, #ff9a71 0%, #f7749f 48%, #c98bf0 100%);
  --grad-glass: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.6));
  --grad-sheen: linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, 0.62) 48%, transparent 74%);

  /* --- тени --- */
  --sh-xs: 0 2px 8px rgba(206, 124, 157, 0.08);
  --sh-sm: 0 8px 22px rgba(206, 124, 157, 0.1);
  --sh-md: 0 16px 44px rgba(206, 124, 157, 0.14);
  --sh-lg: 0 30px 80px rgba(198, 112, 148, 0.18);
  --sh-glow: 0 14px 34px rgba(247, 139, 178, 0.34);
  --sh-glow-strong: 0 18px 44px rgba(247, 130, 172, 0.46);
  --sh-inset: inset 0 1px 0 rgba(255, 255, 255, 0.88);

  /* --- радиусы --- */
  --r-xs: 12px;
  --r-sm: 16px;
  --r-md: 22px;
  --r-lg: 28px;
  --r-xl: 34px;
  --r-pill: 999px;

  /* --- движение --- */
  --ease: cubic-bezier(0.22, 0.75, 0.28, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.4, 0.14, 0.3, 1);
  --dur-fast: 160ms;
  --dur: 280ms;
  --dur-slow: 520ms;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  background:
    radial-gradient(1100px 560px at 4% -10%, rgba(255, 208, 181, 0.72), transparent 58%),
    radial-gradient(900px 520px at 99% -2%, rgba(255, 196, 218, 0.66), transparent 56%),
    radial-gradient(820px 620px at 88% 104%, rgba(255, 205, 224, 0.5), transparent 60%),
    radial-gradient(760px 600px at 6% 96%, rgba(232, 220, 255, 0.42), transparent 60%),
    linear-gradient(180deg, #fffdfc 0%, #fffaf8 34%, #fffbfb 66%, #fffcfb 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* мягкие облака, медленно плывущие по холсту */
body::before {
  content: "";
  position: fixed;
  inset: -18vmax;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(closest-side circle at 18% 24%, rgba(255, 190, 158, 0.4), transparent 70%),
    radial-gradient(closest-side circle at 78% 16%, rgba(255, 180, 208, 0.36), transparent 70%),
    radial-gradient(closest-side circle at 60% 80%, rgba(216, 194, 255, 0.26), transparent 72%),
    radial-gradient(closest-side circle at 10% 84%, rgba(255, 216, 226, 0.32), transparent 72%);
  filter: blur(42px) saturate(110%);
  opacity: 0.62;
  animation: cloudDriftA 46s var(--ease-soft) infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: -22vmax;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(closest-side circle at 84% 60%, rgba(255, 208, 182, 0.3), transparent 68%),
    radial-gradient(closest-side circle at 30% 6%, rgba(255, 228, 238, 0.4), transparent 68%),
    radial-gradient(closest-side circle at 94% 98%, rgba(238, 218, 255, 0.24), transparent 70%);
  filter: blur(56px);
  opacity: 0.6;
  animation: cloudDriftB 62s var(--ease-soft) infinite alternate;
}

@keyframes cloudDriftA {
  0% {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }
  50% {
    transform: translate3d(3%, 2.5%, 0) scale(1.06);
  }
  100% {
    transform: translate3d(-1.5%, 3%, 0) scale(1.02);
  }
}

@keyframes cloudDriftB {
  0% {
    transform: translate3d(2%, 2%, 0) scale(1.04);
  }
  50% {
    transform: translate3d(-3%, -1.5%, 0) scale(1);
  }
  100% {
    transform: translate3d(1%, -3%, 0) scale(1.05);
  }
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  color: var(--ink-strong);
  letter-spacing: -0.03em;
  line-height: 1.12;
}

strong,
b {
  color: var(--ink-strong);
}

p {
  color: var(--ink-soft);
}

button,
input,
textarea,
select {
  font: inherit;
  font-family: inherit;
}

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

textarea,
input {
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

::selection {
  background: rgba(255, 178, 205, 0.42);
  color: var(--ink-strong);
}

::placeholder {
  color: var(--ink-faint);
}

/* аккуратные скроллбары в тон палитре */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 168, 194, 0.55) transparent;
}

*::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
  background-color: rgba(244, 168, 194, 0.5);
}

*::-webkit-scrollbar-thumb:hover {
  background-color: rgba(240, 143, 176, 0.75);
}

:focus-visible {
  outline: 2px solid rgba(246, 141, 178, 0.75);
  outline-offset: 3px;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
