/* ============================================================
   AI для медицинских маркетологов — общие стили
   ============================================================ */

/* --- Reset & Base ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Dark (slides) */
  --bg:         #09090B;
  --bg-card:    #18181B;
  --bg-card2:   #27272A;
  --border:     #3F3F46;
  --accent:     #818CF8;
  --accent-dim: #4338CA;
  --text:       #FAFAFA;
  --muted:      #A1A1AA;
  --dim:        #52525B;
  --ok:         #34D399;
  --warn:       #FBBF24;

  /* Light (course) */
  --c-bg:       #F4F4F5;
  --c-card:     #FFFFFF;
  --c-border:   #E4E4E7;
  --c-text:     #18181B;
  --c-muted:    #71717A;
  --c-accent:   #4F46E5;
  --c-accent-l: #EEF2FF;
  --c-code:     #1E1E2E;

  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

html { font-family: var(--font); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; font-family: inherit; }

/* --- Slides layout ----------------------------------------- */
body.slides-page {
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

.slides-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.slide {
  display: none;
  position: absolute;
  inset: 0;
  padding: 5vw 6vw;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  animation: fadeIn 0.25s ease;
}
.slide.active { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Slide nav controls */
.slide-controls {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  z-index: 100;
}

.slide-btn {
  background: var(--bg-card2);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.slide-btn:hover { background: var(--bg-card); color: var(--text); }

.slide-counter {
  font-size: 0.8rem;
  color: var(--dim);
  min-width: 4rem;
  text-align: center;
  letter-spacing: 0.05em;
}

/* Slide elements */
.slide-tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.slide h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.slide h2 {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

.slide p.lead {
  font-size: clamp(1rem, 2vw, 1.5rem);
  color: var(--muted);
  max-width: 72ch;
  line-height: 1.6;
}

.slide .accent { color: var(--accent); }
.slide .ok { color: var(--ok); }
.slide .warn { color: var(--warn); }

/* Two-column grid for slides */
.slide-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  width: 100%;
  max-width: 1200px;
}

/* Card for slide */
.slide-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
}

.slide-card h3 {
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

.slide-card p, .slide-card li {
  font-size: clamp(0.85rem, 1.5vw, 1.1rem);
  color: var(--muted);
  line-height: 1.7;
}

.slide-card ul { list-style: none; }
.slide-card ul li::before {
  content: '—';
  color: var(--dim);
  margin-right: 0.6rem;
}

/* Steps scale (Устинов) */
.steps-scale {
  width: 100%;
  max-width: 1200px;
}

.steps-row {
  display: flex;
  gap: 0.35rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.step-item {
  flex: 1;
  min-width: 70px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.6rem;
  text-align: center;
  transition: all 0.2s;
}

.step-item .step-num {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--dim);
  display: block;
  margin-bottom: 0.35rem;
}

.step-item .step-label {
  font-size: 0.65rem;
  color: var(--muted);
  line-height: 1.3;
}

.step-item.active-step {
  background: var(--accent-dim);
  border-color: var(--accent);
}
.step-item.active-step .step-num,
.step-item.active-step .step-label { color: var(--text); }

.step-item.target-step {
  border-color: var(--ok);
}
.step-item.target-step .step-num { color: var(--ok); }

.steps-legend {
  display: flex;
  gap: 2rem;
  margin-top: 1.25rem;
  font-size: 0.8rem;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
}
.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Quote block */
.slide-quote {
  border-left: 4px solid var(--accent);
  padding-left: 2rem;
  max-width: 900px;
}
.slide-quote p {
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  font-weight: 500;
  line-height: 1.5;
  font-style: italic;
  color: var(--text);
}
.slide-quote cite {
  display: block;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-style: normal;
}

/* Demo stage cards */
.demo-stages {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  width: 100%;
  max-width: 1200px;
}
.demo-stage {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.demo-stage .stage-n {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.demo-stage .stage-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.demo-stage .stage-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}
.demo-stage.running {
  border-color: var(--ok);
  background: #052E16;
}

/* Stack layers */
.stack-layers {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 700px;
  width: 100%;
}
.stack-layer {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
}
.stack-layer .layer-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.stack-layer .layer-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.stack-layer .layer-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Big stat */
.stat-row {
  display: flex;
  gap: 3rem;
  margin-top: 1rem;
}
.stat-item .stat-num {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat-item .stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* Course modules list (slides page) */
.modules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 1100px;
  width: 100%;
}
.module-card-slide {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.module-card-slide .mod-n {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.module-card-slide .mod-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.module-card-slide .mod-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Code block in slides */
.slide-code {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  line-height: 1.7;
  max-width: 900px;
  width: 100%;
  white-space: pre-wrap;
}

/* Checklist */
.checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 700px;
}
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  font-size: clamp(0.9rem, 1.8vw, 1.2rem);
  color: var(--muted);
}
.checklist li .check-n {
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

/* Home page -------------------------------------------------- */
body.home-page {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-family: var(--font);
}

.home-hero {
  padding: 5rem 5vw 4rem;
  max-width: 1100px;
  margin: 0 auto;
}
.home-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.home-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}
.home-hero p {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 60ch;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.home-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn-primary {
  background: var(--accent);
  color: #18181B;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius);
  display: inline-block;
  transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.85; }

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: inline-block;
  transition: background 0.15s;
}
.btn-secondary:hover { background: var(--bg-card2); }

.home-modules {
  padding: 0 5vw 5rem;
  max-width: 1100px;
  margin: 0 auto;
}
.home-modules h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.modules-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.module-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: block;
  transition: border-color 0.15s, background 0.15s;
}
.module-card:hover {
  border-color: var(--accent);
  background: var(--bg-card2);
}
.module-card .m-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.module-card .m-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.module-card .m-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Course page ----------------------------------------------- */
body.course-page {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font);
  min-height: 100vh;
}

.course-nav {
  background: var(--c-card);
  border-bottom: 1px solid var(--c-border);
  padding: 1rem 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.course-nav a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-accent);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: opacity 0.15s;
}
.course-nav a:hover { opacity: 0.7; }
.course-nav .nav-progress {
  font-size: 0.8rem;
  color: var(--c-muted);
  background: var(--c-bg);
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
}

.course-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 3rem 5vw 6rem;
}

.module-header {
  margin-bottom: 3rem;
}
.mod-tag-pill {
  display: inline-block;
  background: var(--c-accent-l);
  color: var(--c-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 99px;
  margin-bottom: 1rem;
}
.module-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
  color: var(--c-text);
}
.module-header .lead {
  font-size: 1.1rem;
  color: var(--c-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.outcome-box {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.5rem;
}
.outcome-box strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-accent);
  margin-bottom: 0.35rem;
}
.outcome-box p {
  font-size: 0.95rem;
  color: var(--c-text);
  line-height: 1.6;
}

/* Course sections */
.course-section {
  margin-bottom: 2.5rem;
}
.course-section h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--c-text);
}
.course-section p {
  font-size: 1rem;
  color: var(--c-muted);
  line-height: 1.75;
  margin-bottom: 0.75rem;
}
.course-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.course-section ul li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.95rem;
  color: var(--c-muted);
  line-height: 1.6;
}
.course-section ul li::before {
  content: '→';
  color: var(--c-accent);
  flex-shrink: 0;
  font-weight: 700;
}

/* Prompt block */
.prompt-block {
  background: var(--c-code);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1.5rem 0;
}
.prompt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.prompt-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6366F1;
}
.copy-btn {
  background: rgba(99,102,241,0.15);
  color: #818CF8;
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
}
.copy-btn:hover { background: rgba(99,102,241,0.25); }
.copy-btn.copied { color: #34D399; border-color: rgba(52,211,153,0.3); background: rgba(52,211,153,0.1); }

.prompt-block pre {
  padding: 1.5rem;
  overflow-x: auto;
}
.prompt-block code {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.8;
  color: #E4E4E7;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Info / tip / warn boxes */
.tip-box {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  font-size: 0.9rem;
  color: #1E40AF;
  line-height: 1.6;
}
.tip-box strong { display: block; font-weight: 700; margin-bottom: 0.25rem; }

.warn-box {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  font-size: 0.9rem;
  color: #92400E;
  line-height: 1.6;
}

/* Step sequence (numbered) */
.step-seq {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 1.25rem 0;
}
.step-seq-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.step-seq-n {
  background: var(--c-accent);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.step-seq-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 0.3rem;
}
.step-seq-body p {
  font-size: 0.9rem;
  color: var(--c-muted);
  line-height: 1.6;
  margin: 0;
}

/* Module nav footer */
.module-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--c-border);
}
.module-footer a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--c-accent);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.module-footer a:hover { text-decoration: underline; }
.module-footer .next-btn {
  background: var(--c-accent);
  color: white;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.15s;
}
.module-footer .next-btn:hover { opacity: 0.85; text-decoration: none; }

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--c-border);
  margin: 2rem 0;
}

/* Code inline */
code.inline {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 4px;
  padding: 0.15em 0.4em;
  font-family: var(--mono);
  font-size: 0.85em;
  color: var(--c-accent);
}

/* Responsive */
@media (max-width: 768px) {
  .slide-grid-2 { grid-template-columns: 1fr; }
  .demo-stages { grid-template-columns: 1fr 1fr; }
  .modules-grid { grid-template-columns: 1fr; }
  .stat-row { gap: 1.5rem; }
}
