/* TrackLane — общие стили поверх Tailwind */
:root {
  color-scheme: dark;
  --tl-bg: #04060a;
  --tl-lane: #34d6a6;
  --tl-signal: #22d3ee;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--tl-bg); font-feature-settings: 'cv11', 'ss01', 'ss03'; }
::selection { background: rgba(52, 214, 166, .3); color: #fff; }

/* Скроллбар */
* { scrollbar-width: thin; scrollbar-color: #273246 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #1b2433; border-radius: 999px; border: 2px solid var(--tl-bg); }
*::-webkit-scrollbar-track { background: transparent; }

/* Текст с градиентом */
.text-gradient {
  background: linear-gradient(100deg, #ecfdf7 0%, #6be9c3 45%, #22d3ee 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Маска для фоновой сетки */
.mask-fade-b { -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 100%); mask-image: linear-gradient(to bottom, #000 30%, transparent 100%); }
.mask-fade-x { -webkit-mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent); mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent); }

/* Граница-градиент для карточек */
.card-edge { position: relative; isolation: isolate; }
.card-edge::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; z-index: -1;
  background: linear-gradient(160deg, rgba(52,214,166,.35), rgba(148,163,184,.08) 35%, rgba(148,163,184,.05) 70%, rgba(34,211,238,.25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}

/* Подсветка под курсором (features) */
.spotlight { --x: 50%; --y: 50%; }
.spotlight::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--x) var(--y), rgba(52,214,166,.09), transparent 45%);
}
.spotlight:hover::after { opacity: 1; }

/* Блоки кода */
.code-block pre { margin: 0; overflow-x: auto; }
.code-block code, .code-inline { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.code-block pre code.hljs { background: transparent; padding: 0; font-size: .8125rem; line-height: 1.7; color: #cbd5e1; }
.hljs-keyword, .hljs-built_in, .hljs-literal { color: #c4b5fd; }
.hljs-string, .hljs-meta .hljs-string { color: #6be9c3; }
.hljs-number { color: #fbbf24; }
.hljs-attr, .hljs-attribute, .hljs-property { color: #67e8f9; }
.hljs-title, .hljs-title.function_ { color: #93c5fd; }
.hljs-comment { color: #64748b; font-style: italic; }
.hljs-variable, .hljs-params, .hljs-template-variable { color: #e2e8f0; }
.hljs-meta, .hljs-section { color: #f472b6; }
.hljs-punctuation { color: #94a3b8; }

/* Прозаический контент документации */
.doc-prose p { color: #94a3b8; line-height: 1.75; margin-top: 1rem; }
.doc-prose p strong, .doc-prose li strong { color: #e2e8f0; font-weight: 600; }
.doc-prose ul { margin-top: 1rem; display: grid; gap: .5rem; }
.doc-prose li { color: #94a3b8; padding-left: 1.25rem; position: relative; line-height: 1.7; }
.doc-prose li::before { content: ''; position: absolute; left: .25rem; top: .7em; width: 6px; height: 6px; border-radius: 2px; background: #10bf8d; }
.doc-prose code:not(pre code) {
  font-family: 'JetBrains Mono', monospace; font-size: .8em; color: #6be9c3;
  background: rgba(16,191,141,.08); border: 1px solid rgba(16,191,141,.18); padding: .1em .4em; border-radius: .375rem;
}
.doc-prose h2 { scroll-margin-top: 6rem; }
.doc-prose h3 { scroll-margin-top: 6rem; }
.doc-prose a:not(.no-underline) { color: #6be9c3; text-decoration: underline; text-decoration-color: rgba(107,233,195,.35); text-underline-offset: 3px; }

/* FAQ */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details[open] .faq-icon { transform: rotate(45deg); }

/* Range-слайдер калькулятора */
input[type='range'].tl-range { -webkit-appearance: none; appearance: none; height: 6px; border-radius: 999px; background: linear-gradient(to right, #10bf8d var(--fill, 30%), #1b2433 var(--fill, 30%)); outline: none; }
input[type='range'].tl-range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #ecfdf7; border: 4px solid #10bf8d; box-shadow: 0 0 0 6px rgba(16,191,141,.15); cursor: pointer; }
input[type='range'].tl-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #ecfdf7; border: 4px solid #10bf8d; box-shadow: 0 0 0 6px rgba(16,191,141,.15); cursor: pointer; }
input[type='range'].tl-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 6px rgba(34,211,238,.45); }

/* Появление при скролле */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* Полоски аптайма */
.uptime-bar { transition: transform .15s ease, filter .15s ease; transform-origin: bottom; }
.uptime-bar:hover { transform: scaleY(1.12); filter: brightness(1.25); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
