/* =====================================================================
   stpvv workflow — UI-KIT (тёплая светлая тема в стиле Anthropic / Claude)
   Кремовый фон, фирменный терракотово-красный акцент (Claude coral),
   тёмно-тёплый текст, серифные заголовки. Простые сплошные панели,
   мягкие границы — без «жидкого стекла» и артефактов.
   ===================================================================== */

/* --------------------------- ТОКЕНЫ ------------------------------- */
:root {
  /* Фон и поверхности (тёплые кремовые) */
  --bg:             #F0EEE6;   /* фирменный кремовый фон */
  --bg-2:           #EAE7DC;
  --panel:          #FBFAF7;   /* карточки/панели — почти белый тёплый */
  --panel-2:        #FFFFFF;   /* модалки — белый */
  --surface:        #F2F0E9;   /* строки/элементы внутри панели */
  --surface-hi:     #EAE7DC;   /* hover */
  --surface-2:      #FFFFFF;   /* поля ввода */

  /* Границы и тени (тёплые, мягкие) */
  --border:         #E4E0D4;
  --border-hi:      #D6D1C2;
  --shadow:         0 6px 20px -10px rgba(60, 50, 40, 0.18);
  --shadow-lg:      0 24px 60px -20px rgba(60, 50, 40, 0.28);

  /* Текст (тёмно-тёплый) */
  --text:           #1B1917;
  --text-dim:       #605A52;
  --text-mute:      #93897B;

  /* Акцент — Claude coral / терракота */
  --accent:         #C9634A;   /* фирменный красно-терракотовый */
  --accent-2:       #D97757;   /* светлее для градиента */
  --accent-weak:    rgba(201, 99, 74, 0.12);
  --accent-glow:    rgba(201, 99, 74, 0.28);

  /* Скругления */
  --r-xl: 20px;
  --r-lg: 18px;
  --r-md: 14px;
  --r-sm: 10px;
  --r-pill: 999px;

  /* Переход */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  /* Серифный шрифт для заголовков (как на сайте Claude) */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           Georgia, "Times New Roman", serif;
}

/* --------------------------- СБРОС -------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent-weak); color: var(--accent); }

/* ------------------------------ ФОН ------------------------------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1000px 700px at 50% -12%, rgba(201, 99, 74, 0.10), transparent 62%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
.bg > .field { display: none; }

/* --------------------------- ПАНЕЛИ ------------------------------- */
.glass {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
}
.glass .spec, .glass .refract { display: none !important; }

.concentric { border-radius: var(--r-lg); }

/* ------------------------- КНОПКИ --------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 20px;
  font-size: 15px;
  font-weight: 550;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease),
              transform .15s var(--ease);
}
.btn:hover { background: var(--surface-hi); border-color: var(--text-mute); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-accent {
  color: #fff;
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 8px 20px -10px var(--accent-glow);
}
.btn-accent:hover {
  background: var(--accent-2);
  box-shadow: 0 10px 26px -10px var(--accent-glow);
}
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface); border-color: var(--border); }
.btn-sm { padding: 8px 14px; font-size: 13.5px; }
.btn-icon { padding: 9px; width: 40px; height: 40px; border-radius: var(--r-md); }

/* ------------------------- ПОЛЯ ВВОДА ----------------------------- */
.field {
  width: 100%;
  padding: 11px 14px;
  color: var(--text);
  font-size: 15px;
  background: var(--surface-2);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-sm);
  outline: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field::placeholder { color: var(--text-mute); }
.field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-weak);
}
textarea.field { resize: vertical; min-height: 96px; line-height: 1.5; }
.label {
  display: block;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 8px 2px;
}

/* --------------------------- ПРОЧЕЕ ------------------------------- */
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.title-lg {
  font-family: var(--serif);
  font-size: clamp(26px, 4.4vw, 40px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--text);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  font-size: 12px;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
}

/* Скроллбар */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: rgba(60, 50, 40, 0.18);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(60, 50, 40, 0.30); background-clip: content-box; }

/* Появление */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.rise { animation: rise 0.4s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
