/* AS — Kseles · shared design tokens
   Двойственная палитра: светлая = день, тёмная = ночь.
   Чёрный не использовать. Текст — лесной зелёный / молочный.
*/

:root {
  /* light theme (default) */
  --bg:        #F4EFE6;   /* кремовый */
  --bg-2:     #ECE4D3;   /* песок темнее */
  --bg-3:     #E8DFD0;   /* песок */
  --ink:        #2D3A2E;   /* лесной зелёный */
  --ink-soft:   #5A6A5C;
  --ink-mute:   #8A968C;
  --line:       #D9CFBC;
  --accent:     #B8674A;   /* терракот */
  --accent-2:   #C99A5B;   /* охра */
  --warm:       #C9966B;   /* медь, общая */
  --paper:      #FAF6EE;
  --shadow:     0 1px 0 rgba(45,58,46,.04), 0 20px 60px -30px rgba(45,58,46,.18);
}

[data-theme="dark"] {
  --bg:        #1A1F1C;   /* графитово-зелёный */
  --bg-2:     #232a25;
  --bg-3:     #2c332e;   /* серо-стальной чуть темнее */
  --ink:        #E8DFD0;   /* молочный */
  --ink-soft:   #B8B0A0;
  --ink-mute:   #7d8479;
  --line:       #3A3F3B;
  --accent:     #C9966B;   /* тёплая медь */
  --accent-2:   #C99A5B;
  --warm:       #C9966B;
  --paper:      #1F2522;
  --shadow:     0 1px 0 rgba(0,0,0,.2), 0 24px 60px -28px rgba(0,0,0,.55);
}

/* fonts */
/* self-hosted fonts · Latin + Cyrillic · downloaded from Google Fonts CDN */

/* latin-ext */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../fonts/fraunces-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../fonts/fraunces-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../fonts/inter-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* cyrillic-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 600ms ease, color 600ms ease;
}

::selection { background: var(--accent); color: var(--paper); }

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklab, var(--ink) 25%, transparent);
  transition: border-color 200ms ease, color 200ms ease;
}
a:hover { border-color: var(--accent); color: var(--accent); }

button {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid var(--line);
  padding: .55em 1em;
  border-radius: 999px;
  cursor: pointer;
  transition: all 200ms ease;
}
button:hover { border-color: var(--accent); color: var(--accent); }

.serif {
  font-family: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  letter-spacing: -0.01em;
}

.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .78em;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-mute); }

/* shared chrome — language + theme pill */
.chrome {
  position: fixed; right: 24px; top: 24px;
  display: flex; gap: 8px; align-items: center;
  z-index: 50;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.chrome .pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
}
.chrome .pill button {
  border: none; padding: 4px 8px;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-mute);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}
.chrome .pill button.on { background: var(--ink); color: var(--bg); }
.chrome .pill button:hover { color: var(--ink); }
.chrome .pill button.on:hover { color: var(--bg); }

/* tiny AI nub bottom-right */
.ai-nub {
  position: fixed; right: 24px; bottom: 24px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 16px 12px 14px;
  background: var(--ink); color: var(--bg);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  z-index: 50;
  border: none;
  box-shadow: var(--shadow);
  transition: transform .25s ease, background .3s ease;
}
.ai-nub:hover { transform: translateY(-2px); }
.ai-nub .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 60%, transparent);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 60%, transparent); }
  50%       { box-shadow: 0 0 0 8px color-mix(in oklab, var(--accent) 0%, transparent); }
}

/* dome wireframe SVG container */
.dome-svg path,
.dome-svg line,
.dome-svg polygon { fill: none; stroke: currentColor; vector-effect: non-scaling-stroke; }

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