/* ============ TEKING v2 — бордо / неон ============ */
:root {
    --bg: #2E272B;
    --bg-deep: #241E21;
    --acc: #7A0D22;
    --acc-h: #A5102C;
    --acc-deep: #4A0813;
    --txt: #F3EEEF;
    --txt2: #AD9EA3;
    --ok: #43CE74;
    --yellow: #FFC24B;
    --text-secondary: var(--txt2);
    --font-mono: 'JetBrains Mono', monospace;
    --line: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.035);
    --glass-border: rgba(255, 255, 255, 0.09);
    --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--txt);
    font-family: 'Manrope', 'Inter', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { font-weight: 800; line-height: 1.2; }

a { color: var(--acc-h); text-decoration: none; }

.mono, .chat-badge { font-family: 'JetBrains Mono', monospace; }

/* ---------- Фоновые светящиеся пятна ---------- */
.bg-glow {
    position: fixed; border-radius: 50%; filter: blur(120px);
    opacity: 0.22; pointer-events: none; z-index: 0;
    animation: drift 18s ease-in-out infinite alternate;
}
.bg-glow.g1 { width: 520px; height: 520px; background: var(--acc); top: -160px; left: -120px; }
.bg-glow.g2 { width: 420px; height: 420px; background: var(--acc-deep); bottom: -120px; right: -80px; animation-delay: -9s; }

@keyframes drift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(60px, 40px) scale(1.15); }
}

/* ---------- Header ---------- */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(27, 19, 22, 0.75);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.header.scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 30px rgba(0,0,0,0.35); }
.header-inner { display: flex; align-items: center; gap: 28px; height: 68px; }

.logo {
    font-weight: 800; font-size: 22px; letter-spacing: 3px;
    color: var(--txt); font-family: 'JetBrains Mono', monospace;
}
.logo span { color: var(--acc-h); }

.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--txt2); font-size: 14px; font-weight: 600; transition: color 0.2s; }
.nav a:hover { color: var(--txt); }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px; border-radius: 12px; border: none;
    font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
    background: linear-gradient(135deg, var(--acc-h), var(--acc));
    color: #fff; box-shadow: 0 4px 24px rgba(124, 13, 34, 0.35);
}
.btn-primary:hover { box-shadow: 0 6px 32px rgba(124, 13, 34, 0.55); transform: translateY(-1px); }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 9px; }
.btn-danger { background: rgba(124, 13, 34, 0.15); color: var(--acc-h); border: 1px solid rgba(124, 13, 34, 0.4); }
.btn-ghost { background: var(--glass-bg); color: var(--txt); border: 1px solid var(--glass-border); }

/* ---------- Glass ---------- */
.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 150px 0 40px; z-index: 1; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero-text { max-width: 720px; }
.hero-kicker {
    font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 2px;
    color: var(--acc-h); text-transform: uppercase; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(30px, 4.2vw, 48px); margin-bottom: 18px; }
.hero h1 .accent { color: var(--acc-h); }
.hero-sub { color: var(--txt2); font-size: 17px; max-width: 480px; margin-bottom: 28px; }
.hero-stats { display: flex; gap: 32px; margin-top: 34px; }
.hero-stat b { display: block; font-size: 26px; color: var(--txt); }
.hero-stat span { font-size: 13px; color: var(--txt2); }

.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-pc {
    width: min(340px, 80%); filter: drop-shadow(0 24px 60px rgba(110, 10, 30, 0.45));
    animation: bob 5s ease-in-out infinite;
}
@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-16px); }
}

/* ---------- Чат ---------- */
.chat-section { position: relative; z-index: 1; padding: 30px 0 60px; }
.chat-window { max-width: 860px; margin: 0 auto; overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,0.4); }

.chat-header {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 22px; border-bottom: 1px solid var(--line);
}
.online-indicator {
    width: 10px; height: 10px; border-radius: 50%; background: var(--ok);
    box-shadow: 0 0 0 0 rgba(67, 206, 116, 0.6);
    animation: wdot 2s infinite;
}
@keyframes wdot {
    0% { box-shadow: 0 0 0 0 rgba(67, 206, 116, 0.5); }
    70% { box-shadow: 0 0 0 9px rgba(67, 206, 116, 0); }
    100% { box-shadow: 0 0 0 0 rgba(67, 206, 116, 0); }
}
.chat-title { font-weight: 800; font-size: 15px; }
.chat-status { font-size: 12px; color: var(--txt2); }
.chat-badge {
    margin-left: auto; font-size: 11px; color: var(--txt2);
    border: 1px solid var(--line); border-radius: 20px; padding: 4px 12px;
}

.chat-input-area { padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.input-label {
    font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 1.5px;
    text-transform: uppercase; color: var(--acc-h); margin-bottom: 10px;
}
.input-row { display: flex; gap: 10px; }
#chatInput {
    flex: 1; background: rgba(0,0,0,0.3); border: 1px solid var(--line);
    border-radius: 12px; padding: 14px 16px; color: var(--txt);
    font-family: inherit; font-size: 15px; outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
#chatInput:focus {
    border-color: var(--acc-h);
    animation: ringPulse 2.4s ease-out infinite;
}
@keyframes ringPulse {
    0% { box-shadow: 0 0 0 0 rgba(124, 13, 34, 0.35); }
    70% { box-shadow: 0 0 0 12px rgba(124, 13, 34, 0); }
    100% { box-shadow: 0 0 0 0 rgba(124, 13, 34, 0); }
}
#chatInput::placeholder { color: var(--txt2); }

.send-btn {
    width: 50px; height: 50px; border-radius: 12px; border: none; cursor: pointer;
    background: linear-gradient(135deg, var(--acc-h), var(--acc));
    color: #fff; display: flex; align-items: center; justify-content: center;
    transition: box-shadow 0.2s, transform 0.15s;
}
.send-btn:hover:not(:disabled) { box-shadow: 0 0 24px rgba(124, 13, 34, 0.5); }
.send-btn:disabled { opacity: 0.5; cursor: default; }

.quick-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.chips-label { font-size: 12px; color: var(--txt2); }
.chip {
    background: rgba(110, 10, 30, 0.12); color: var(--txt);
    border: 1px solid rgba(124, 13, 34, 0.3); border-radius: 20px;
    padding: 6px 14px; font-size: 13px; font-family: inherit; cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.chip:hover { background: rgba(124, 13, 34, 0.25); border-color: var(--acc-h); }

.chat-messages { height: 380px; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.message { display: flex; animation: msgIn 0.35s ease both; }
@keyframes msgIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.message-bubble {
    max-width: 82%; padding: 13px 17px; border-radius: 14px; font-size: 14.5px;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
}
.user-message { justify-content: flex-end; }
.user-message .message-bubble {
    background: linear-gradient(135deg, var(--acc-h), var(--acc));
    border: none; color: #fff;
}
.message-bubble table { border-collapse: collapse; margin: 10px 0; width: 100%; font-size: 13px; }
.message-bubble td, .message-bubble th { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.message-bubble blockquote { border-left: 3px solid var(--acc-h); padding-left: 12px; margin: 8px 0; color: var(--txt2); }

.chat-typing { display: flex; gap: 5px; padding: 6px 22px 18px; }
.chat-typing .dot {
    width: 7px; height: 7px; border-radius: 50%; background: var(--acc-h);
    animation: pl 1.2s infinite;
}
.chat-typing .dot:nth-child(2) { animation-delay: 0.15s; }
.chat-typing .dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes pl {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* ---------- Секции ---------- */
.section { position: relative; z-index: 1; padding: 80px 0; }
.section-title { font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 12px; }
.section-sub { color: var(--txt2); max-width: 560px; margin-bottom: 40px; }

/* Reveal-анимация при скролле */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Как писать ---------- */
.howto-card { max-width: 860px; margin: 0 auto; padding: 36px; text-align: center; }
.howto-formula {
    font-family: 'JetBrains Mono', monospace; font-size: clamp(13px, 2.2vw, 17px);
    letter-spacing: 2px; color: var(--acc-h); margin: 20px 0;
    padding: 16px; border: 1px dashed rgba(124, 13, 34, 0.4); border-radius: 12px;
}
.howto-card p { color: var(--txt2); margin-top: 12px; font-size: 15px; }

/* ---------- Схема работы ---------- */
.scheme-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.scheme-step { padding: 26px 22px; position: relative; }
.scheme-num {
    font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--acc-h);
    letter-spacing: 2px; margin-bottom: 14px;
}
.scheme-step h3 { font-size: 17px; margin-bottom: 8px; }
.scheme-step p { font-size: 13.5px; color: var(--txt2); }

/* ---------- Шоурум ---------- */
.showroom-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; max-width: 880px; margin: 0 auto; }
.showroom-item { overflow: hidden; position: relative; border-radius: var(--radius); border: 1px solid var(--glass-border); }
.showroom-item img { width: 100%; height: 100%; max-height: 300px; object-fit: cover; display: block; transition: transform 0.5s ease; }
.showroom-item:hover img { transform: scale(1.05); }
.showroom-item .tag {
    position: absolute; left: 14px; bottom: 14px;
    background: rgba(27, 19, 22, 0.8); backdrop-filter: blur(8px);
    border: 1px solid var(--line); border-radius: 20px;
    padding: 6px 14px; font-size: 12.5px; font-weight: 700;
}
.sr-1 { grid-column: span 7; aspect-ratio: 16 / 10; }
.sr-2 { grid-column: span 5; aspect-ratio: 4 / 3; }
.sr-3 { grid-column: span 4; aspect-ratio: 4 / 3; }
.sr-4 { grid-column: span 4; aspect-ratio: 4 / 3; }
.sr-5 { grid-column: span 4; aspect-ratio: 4 / 3; }

/* ---------- Преимущества ---------- */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { padding: 28px 24px; transition: border-color 0.3s, transform 0.3s; }
.feature:hover { border-color: rgba(124, 13, 34, 0.4); transform: translateY(-4px); }
.feature-icon { font-size: 26px; margin-bottom: 14px; }
.feature-title { font-weight: 800; font-size: 16px; margin-bottom: 8px; }
.feature-desc { font-size: 14px; color: var(--txt2); }

/* ---------- Каталог ---------- */
.catalog-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.filter-btn {
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    color: var(--txt2); border-radius: 20px; padding: 7px 16px;
    font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all 0.2s;
}
.filter-btn.active, .filter-btn:hover { background: var(--acc); border-color: var(--acc); color: #fff; }

.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.catalog-card {
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-radius: 14px; padding: 18px; transition: border-color 0.25s, transform 0.25s;
}
.catalog-card:hover { border-color: rgba(124, 13, 34, 0.45); transform: translateY(-3px); }
.card-category { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--acc-h); font-family: 'JetBrains Mono', monospace; margin-bottom: 6px; }
.card-model { font-weight: 800; font-size: 15px; margin-bottom: 6px; }
.card-meta { font-size: 12.5px; color: var(--txt2); margin-bottom: 12px; }
.card-price { font-size: 18px; font-weight: 800; color: var(--txt); }
.card-old-price { font-size: 13px; color: var(--txt2); text-decoration: line-through; margin-left: 8px; }
.card-discount {
    display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 800;
    color: #fff; background: var(--acc-h); border-radius: 6px; padding: 2px 7px;
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; }
.faq-item { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.faq-q {
    width: 100%; text-align: left; background: none; border: none; cursor: pointer;
    color: var(--txt); font-family: inherit; font-size: 15px; font-weight: 700;
    padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-q::after { content: '+'; font-size: 20px; color: var(--acc-h); transition: transform 0.25s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-a p { padding: 0 20px 18px; color: var(--txt2); font-size: 14px; }

/* ---------- Footer ---------- */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--line); padding: 50px 0 40px; margin-top: 40px; background: var(--bg-deep); }
.footer-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-logo { font-weight: 800; letter-spacing: 3px; font-family: 'JetBrains Mono', monospace; font-size: 20px; }
.footer-text { color: var(--txt2); font-size: 13.5px; max-width: 420px; margin-top: 10px; }
.footer-tg {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 16px;
    color: var(--acc-h); font-weight: 700; font-size: 14px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--txt2); font-size: 14px; }
.footer-links a:hover { color: var(--txt); }

/* ---------- Админка ---------- */
.admin-header { display: flex; justify-content: space-between; align-items: center; margin: 24px 0; gap: 12px; flex-wrap: wrap; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.admin-table th {
    text-align: left; padding: 12px 14px; color: var(--txt2);
    font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
    border-bottom: 1px solid var(--line);
}
.admin-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12.5px; color: var(--txt2); margin-bottom: 6px; font-weight: 600; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; background: rgba(0,0,0,0.3); border: 1px solid var(--line);
    border-radius: 10px; padding: 10px 13px; color: var(--txt);
    font-family: inherit; font-size: 14px; outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--acc-h); }

.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.65); z-index: 200;
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open, .modal-overlay.active { display: flex; }
.modal { background: var(--bg-deep); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 28px; width: 100%; max-width: 520px; max-height: 85vh; overflow-y: auto; }
.modal h3 { margin-bottom: 20px; }

.upload-box {
    border: 2px dashed rgba(124, 13, 34, 0.4); border-radius: 12px;
    padding: 22px; text-align: center; cursor: pointer; transition: background 0.2s;
}
.upload-box:hover { background: rgba(124, 13, 34, 0.06); }
.upload-result { font-size: 13px; margin-top: 10px; }

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-visual { order: -1; }
    .hero-pc { width: 220px; }
    .scheme-grid { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: 1fr; }
    .sr-1, .sr-2, .sr-3, .sr-4, .sr-5 { grid-column: span 12; aspect-ratio: 16 / 10; }
    .nav { display: none; }
    .chat-messages { height: 320px; }
}
@media (max-width: 560px) {
    .scheme-grid { grid-template-columns: 1fr; }
    .hero-stats { gap: 20px; }
}

/* Hero orbit visual */
.hero-visual { position: relative; display: flex; align-items: center; justify-content: center; min-height: 420px; }
.orbit-wrap { position: relative; width: 380px; height: 380px; animation: heroFloat 7s ease-in-out infinite; }
.orbit-ring { position: absolute; inset: 0; border: 1px dashed rgba(124,13,34,.55); border-radius: 50%; animation: orbitSpin 26s linear infinite; }
.orbit-ring.r2 { inset: 52px; border-color: rgba(244,239,240,.14); animation-duration: 18s; animation-direction: reverse; }
.orbit-core { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 118px; height: 118px; border-radius: 28px; background: linear-gradient(150deg, var(--acc-h), var(--acc-deep)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; box-shadow: 0 18px 60px rgba(124,13,34,.45), inset 0 1px 0 rgba(255,255,255,.18); }
.core-chip { font-family: var(--font-mono); font-weight: 700; font-size: 30px; color: #fff; letter-spacing: 1px; }
.core-label { font-size: 12px; color: rgba(255,255,255,.75); }
.orbit-item { position: absolute; top: 50%; left: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; animation: orbitPos 26s linear infinite; }
.orbit-item span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 13px; font-weight: 600; letter-spacing: .5px; color: var(--txt); background: rgba(36,30,33,.92); border: 1px solid rgba(124,13,34,.5); border-radius: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.4); animation: orbitSpinRev 26s linear infinite; }
.oi-1, .oi-1 span { animation-delay: 0s; }
.oi-2, .oi-2 span { animation-delay: -4.33s; }
.oi-3, .oi-3 span { animation-delay: -8.66s; }
.oi-4, .oi-4 span { animation-delay: -13s; }
.oi-5, .oi-5 span { animation-delay: -17.33s; }
.oi-6, .oi-6 span { animation-delay: -21.66s; }
.hero-visual-glow { position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(124,13,34,.28), transparent 65%); filter: blur(10px); animation: pulseGlow 5s ease-in-out infinite; z-index: -1; }
@keyframes orbitSpin { to { transform: rotate(360deg); } }
@keyframes orbitPos { from { transform: rotate(0deg) translateX(190px); } to { transform: rotate(360deg) translateX(190px); } }
@keyframes orbitSpinRev { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }
@keyframes heroFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes pulseGlow { 0%,100% { opacity: .7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { min-height: 320px; }
  .orbit-wrap { width: 300px; height: 300px; }
  @keyframes orbitPos { from { transform: rotate(0deg) translateX(150px); } to { transform: rotate(360deg) translateX(150px); } }
}

/* ---------- GSAP / Lenis / tsParticles ---------- */
#hero-particles {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
