/* Base */
:root {
  --bg: #0b0d10;
  --bg-soft: #0f1216;
  --text: #e8f0f8;
  --muted: #a9b5c1;
  --primary: #facc15; /* жёлтый */
  --accent: #8b5cf6;  /* фиолетовый */
  --card: #12161b;
  --border: #1b2128;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji';
  background: linear-gradient(180deg, var(--bg) 0%, #0a0c0f 100%);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }

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

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(8px); background: rgba(11,13,16,0.6); border-bottom: 1px solid var(--border); transition: all 0.3s ease; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; transition: height 0.3s ease; }
.logo { font-weight: 800; letter-spacing: 0.5px; }
.logo span { opacity: 0.8; font-weight: 600; margin-left: 6px; }
.nav a { margin-left: 18px; color: var(--muted); }
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--primary); }

/* Enhanced buttons with micro-interactions */
.btn { 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  gap: 8px; 
  padding: 12px 16px; 
  border-radius: 10px; 
  border: 1px solid var(--border); 
  color: var(--text); 
  background: #141820; 
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn.primary { 
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%); 
  color: #0b0d10; 
  font-weight: 700; 
  border: 0;
  box-shadow: 
    0 4px 16px rgba(139, 92, 246, 0.4),
    0 0 0 1px rgba(139, 92, 246, 0.1);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 24px rgba(139, 92, 246, 0.6),
    0 0 0 1px rgba(139, 92, 246, 0.2);
}

.btn.ghost { background: transparent; color: var(--text); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 96px 0 120px; border-bottom: 1px solid var(--border); }
.hero h1 { font-size: 44px; line-height: 1.08; margin: 0 0 14px; }
.hero p { color: var(--muted); font-size: 18px; margin: 0 0 22px; }
.hero-cta { display: flex; gap: 12px; }
#heroParticles { position: absolute; inset: 0; z-index: -1; }

/* Background images for sections */
.hero-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.25;
  z-index: 1;
  filter: blur(1px);
}

.manifesto-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../images/manifesto-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.15;
  z-index: 1;
  filter: blur(0.5px);
}

.path-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../images/path-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.2;
  z-index: 1;
  filter: blur(0.5px);
}

.play-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../images/play-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.15;
  z-index: 1;
  filter: blur(0.5px);
}

/* Ensure content is above background images */
.hero .container,
.manifesto .container,
.path .container,
.play .container {
  position: relative;
  z-index: 2;
}
/* Apple-level design: smooth transitions, arrows, animations */
.section { 
  padding: 80px 0;
  position: relative;
}

/* Section connectors with pulsing arrows */
.section-connector {
  position: relative;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  overflow: hidden;
}

.section-connector::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 60px;
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
  transform: translate(-50%, -50%);
  animation: pulse 2s ease-in-out infinite;
}

.section-connector::after {
  content: '↓';
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 24px;
  color: var(--primary);
  transform: translate(-50%, -50%);
  animation: float 3s ease-in-out infinite;
  text-shadow: 0 0 20px rgba(250, 204, 21, 0.6);
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scaleY(0.8); }
  50% { opacity: 1; transform: translate(-50%, -50%) scaleY(1.2); }
}

@keyframes float {
  0%, 100% { transform: translate(-50%, -50%) translateY(0px); }
  50% { transform: translate(-50%, -50%) translateY(-8px); }
}

/* Enhanced hero with gradient text and floating elements */
.hero h1 {
  background: linear-gradient(135deg, var(--text) 0%, var(--primary) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 4px 20px rgba(139, 92, 246, 0.3));
}

.hero p {
  background: linear-gradient(135deg, var(--muted) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Sections */
.section h2 { font-size: 32px; margin: 0 0 20px; }
.grid.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* Floating cards with subtle shadows */
.card { 
  background: linear-gradient(135deg, var(--card) 0%, rgba(18, 22, 27, 0.8) 100%);
  border: 1px solid rgba(139, 92, 246, 0.1);
  border-radius: 14px; 
  padding: 18px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(139, 92, 246, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(139, 92, 246, 0.2);
  box-shadow: 
    0 16px 48px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(139, 92, 246, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.highlight { 
  margin-top: 18px; 
  padding: 18px; 
  border-left: 3px solid var(--primary); 
  background: rgba(126,231,135,0.06); 
  border-radius: 8px; 
}

/* Path */
.path-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
.step { background: linear-gradient(180deg,#12161b, #0f1419); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.level-card { background: #0f1419; border: 1px dashed var(--border); border-radius: 12px; padding: 14px; }

/* Play widgets */
.play .play-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.widget { background: radial-gradient(1200px 400px at 50% 0%, rgba(139,92,246,0.15), transparent), var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px; min-height: 320px; position: relative; overflow: hidden; }
.widget-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.widget-controls label { color: var(--muted); font-size: 12px; margin-right: 12px; display: inline-flex; align-items: center; gap: 8px; }
.widget canvas { width: 100%; height: 240px; background: #0b0f14; border-radius: 10px; border: 1px solid var(--border); }
.calc { display: grid; gap: 8px; }
.calc-output { margin-top: 8px; color: var(--muted); }

/* Reviews */
.reviews { position: relative; height: 50vh; min-height: 360px; overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: linear-gradient(180deg, #0b0d10, #0a1016); }
.reviews-wrap { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 20px; }
.reviews .col { position: relative; overflow: hidden; }
.review-card { position: absolute; left: 0; right: 0; margin: 8px; padding: 14px; background: rgba(18,22,27,0.92); border: 1px solid var(--border); border-radius: 12px; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.35)); }
.marquee-mask { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(11,13,16,1) 0%, rgba(11,13,16,0) 15%, rgba(11,13,16,0) 85%, rgba(11,13,16,1) 100%); z-index: 2; }

/* Enhanced Quiz Design */
.quiz-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.quiz-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(139, 92, 246, 0.2);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  border-radius: 3px;
  transition: width 0.3s ease;
}

.quiz-progress span {
  color: var(--muted);
  font-size: 14px;
  min-width: 60px;
}

.quiz-form h3 {
  font-size: 20px;
  margin: 0 0 20px;
  text-align: center;
  background: linear-gradient(135deg, var(--text), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.quiz-options {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.quiz-option {
  cursor: pointer;
  transition: all 0.2s ease;
}

.quiz-option input[type="radio"] {
  display: none;
}

.option-content {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(18, 22, 27, 0.6);
  border: 2px solid transparent;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.quiz-option:hover .option-content {
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(18, 22, 27, 0.8);
}

.quiz-option input[type="radio"]:checked + .option-content {
  border-color: var(--primary);
  background: rgba(250, 204, 21, 0.1);
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.2);
}

.option-icon {
  font-size: 24px;
  min-width: 32px;
  text-align: center;
}

.option-content div:last-child strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.option-content div:last-child small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.quiz-nav {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.quiz-result {
  text-align: center;
}

.result-header h3 {
  font-size: 24px;
  margin: 0 0 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.result-header p {
  color: var(--muted);
  margin: 0 0 24px;
}

.result-content {
  background: rgba(18, 22, 27, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  text-align: left;
}

.result-lead h4 {
  margin: 0 0 16px;
  color: var(--text);
}

.lead-inputs {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

/* Forms */
.lead-form, .quiz-form .result-lead { display: grid; gap: 10px; }
input, textarea { 
  width: 100%; 
  padding: 12px 14px; 
  border-radius: 10px; 
  border: 1px solid var(--border); 
  background: #0f1419; 
  color: var(--text);
  transition: all 0.2s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.1);
}

.form-status { 
  color: var(--muted); 
  min-height: 20px; 
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
}

.form-status:empty {
  display: none;
}

.quiz-form .quiz-step { display: none; }
.quiz-form .quiz-step.active { display: block; }
.quiz-form .quiz-result.hidden { display: none; }

.quiz-result {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-top: 24px;
  text-align: center;
}

.quiz-result h3 {
  color: var(--primary);
  margin-bottom: 16px;
}

.recommendation-text {
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 20px;
  text-align: left;
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 24px 0; color: var(--muted); }
.site-footer .container { display: flex; align-items: center; justify-content: space-between; }
.socials a { margin-left: 12px; }
.socials a svg { height: 18px; width: 18px; vertical-align: -3px; margin-right: 6px; }

/* AI Chat */
.ai-fab { 
  position: fixed; 
  right: 20px; 
  bottom: 72px; 
  z-index: 60; 
  background: linear-gradient(135deg, var(--accent), var(--primary)); 
  color: #08110a; 
  border: 0; 
  border-radius: 999px; 
  padding: 14px 18px; 
  font-weight: 800; 
  box-shadow: 0 10px 30px rgba(139,92,246,0.35); 
  cursor: pointer; 
  transition: all 0.3s ease;
}

.ai-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 40px rgba(139,92,246,0.45);
}

.ai-chat { 
  position: fixed; 
  right: 20px; 
  bottom: 140px; 
  width: 380px; 
  max-width: calc(100% - 40px); 
  background: #0f1419; 
  border: 1px solid #374151; 
  border-radius: 20px; 
  overflow: hidden; 
  z-index: 70; 
  display: grid; 
  grid-template-rows: auto 1fr auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.ai-msg { position: relative; }
.ai-name { 
  position: absolute; 
  top: -12px; 
  left: 16px; 
  background: #1f2937; 
  border: 1px solid #4b5563; 
  color: #d1d5db; 
  border-radius: 12px; 
  padding: 4px 12px; 
  font-size: 11px; 
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.ai-msg { animation: slideUp .25s ease both; }
@keyframes slideUp { from { transform: translateY(6px); opacity: .0; } to { transform: translateY(0); opacity: 1; } }
.ai-typing { display: inline-flex; gap: 4px; align-items: center; }
.ai-typing .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); opacity: .5; animation: blink 1.2s infinite; }
.ai-typing .dot:nth-child(2){ animation-delay: .2s; }
.ai-typing .dot:nth-child(3){ animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100%{ opacity:.2 } 40%{ opacity: 1 } }

/* Modal CTA */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: none; align-items: center; justify-content: center; z-index: 80; }
.modal.show { display: flex; }
.modal-card { width: 420px; max-width: calc(100% - 40px); background: #0f1419; border: 1px solid var(--border); border-radius: 14px; padding: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.modal-head { display:flex; align-items:center; justify-content: space-between; margin-bottom: 16px; }
.modal-close { background: transparent; border: 0; color: var(--muted); font-size: 24px; cursor: pointer; padding: 4px; border-radius: 4px; transition: all 0.2s ease; }
.modal-close:hover { color: var(--text); background: rgba(255,255,255,0.1); }
.modal-grid { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; }
.lead-inputs { display: grid; gap: 12px; }
.ai-chat.hidden { display: none; }
.ai-header { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: 2px 4px; 
  background: linear-gradient(135deg, #8b5cf6, #a855f7); 
  border-bottom: 1px solid #374151; 
  color: white;
}

.ai-header::before {
  content: "☯";
  font-size: 12px;
  margin-right: 4px;
}

.ai-header h3 {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
}

.ai-close { 
  background: transparent; 
  color: white; 
  border: 0; 
  font-size: 20px; 
  cursor: pointer; 
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.ai-close:hover {
  background: rgba(255,255,255,0.2);
}
.ai-messages { 
  height: 300px; 
  overflow: auto; 
  padding: 16px 20px; 
  display: grid; 
  gap: 16px; 
  background: #0f1419;
}

.ai-msg { 
  position: relative;
  padding: 16px 20px; 
  border-radius: 18px; 
  border: 1px solid #374151; 
  max-width: 85%; 
  font-size: 12px; 
  line-height: 1.4;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  animation: slideUp 0.4s ease-out;
}

.ai-msg.user { 
  background: linear-gradient(135deg, #8b5cf6, #a855f7); 
  color: white;
  margin-left: auto; 
  border-color: #8b5cf6;
}

.ai-msg.bot { 
  background: #1f2937; 
  color: #f9fafb;
  border-color: #4b5563;
}

.ai-msg.typing {
  background: #1f2937;
  color: #9ca3af;
  font-weight: 500;
  border-color: #4b5563;
}

.ai-msg.welcome {
  background: transparent;
  border: none;
  box-shadow: none;
  color: #f9fafb;
  font-weight: 500;
}

@keyframes slideUp {
  from { 
    transform: translateY(20px); 
    opacity: 0; 
  } 
  to { 
    transform: translateY(0); 
    opacity: 1; 
  } 
}
.ai-input { 
  display: flex; 
  gap: 12px; 
  padding: 16px 20px; 
  border-top: 1px solid #374151; 
  background: #0f1419;
}

.ai-input input {
  flex: 1.5;
  border: 1px solid #4b5563;
  border-radius: 20px;
  padding: 12px 20px;
  font-size: 12px;
  background: #1f2937;
  color: #f9fafb;
  transition: all 0.2s ease;
}

.ai-input input:focus {
  outline: none;
  border-color: #8b5cf6;
  background: #374151;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.ai-input input::placeholder {
  color: #6b7280;
}

.ai-input button {
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
  color: white;
  border: 0;
  border-radius: 20px;
  padding: 12px 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-input button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Responsive */
@media (max-width: 1024px) {
  .grid.cols-3 { grid-template-columns: 1fr 1fr; }
  .path-steps { grid-template-columns: 1fr 1fr; }
  .levels { grid-template-columns: 1fr 1fr; }
  .play .play-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: 34px; }
  .nav { display: none; }
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}


