/* Главная страница — демо блоков, анимации, галерея */

.page-main:has(.landing) {
  max-width: 1360px;
  padding: 20px 20px 36px;
}

.landing .hero--landing {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 48px;
}

.landing .hero__intro {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.landing .hero__text {
  margin-bottom: 0;
  font-size: 0.95rem;
  line-height: 1.45;
}

.hero__title--landing {
  font-size: clamp(1.65rem, 3.6vw, 2.2rem);
  line-height: 1.22;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.hero__title-tagline {
  display: inline;
  font-size: 0.52em;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
  white-space: nowrap;
}

.hero__highlight {
  font-style: normal;
  font-weight: 800;
}

.hero__highlight--blocks {
  background: linear-gradient(135deg, #86efac 0%, #4ade80 45%, #22c55e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__highlight--python {
  background: linear-gradient(135deg, #fde68a 0%, #fbbf24 40%, #f97316 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.landing .hero__text strong {
  color: var(--text);
  font-weight: 600;
}

.hero__actions--cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.hero__cta-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}

.hero__cta-btn {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  padding: 13px 14px;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
  border-radius: 12px;
}

.hero__cta-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  opacity: 0.85;
  margin: 0;
  line-height: 1.35;
  text-align: center;
}

.landing .hero__actions {
  justify-content: center;
  margin-top: 0;
}

/* Прокрутка вниз — только десктоп */
.hero__scroll-down {
  display: none;
}

@media (min-width: 1024px) {
  .page-main:has(.landing) {
    padding-top: 12px;
  }

  .landing .hero--landing {
    position: relative;
    min-height: calc(100svh - 76px);
    justify-content: center;
    gap: 18px;
    margin-bottom: 56px;
    padding-bottom: 24px;
  }

  .hero__actions--cta {
    gap: 14px;
  }

  .hero__scroll-down {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding: 0;
    border: none;
    background: transparent;
    color: #fbbf24;
    cursor: pointer;
    transition: opacity 0.35s ease, transform 0.25s ease;
    z-index: 2;
  }

  .hero__scroll-down:hover {
    color: #fde68a;
    transform: translateY(2px);
  }

  .hero__scroll-down:hover .hero__scroll-down-ring {
    border-color: rgba(251, 191, 36, 0.75);
    box-shadow:
      0 0 0 4px rgba(245, 158, 11, 0.12),
      0 0 24px rgba(245, 158, 11, 0.35);
  }

  .hero__scroll-down.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
  }

  .hero__scroll-down-ring {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: 1.5px solid rgba(245, 158, 11, 0.5);
    background:
      radial-gradient(circle at 50% 30%, rgba(251, 191, 36, 0.18) 0%, transparent 65%),
      rgba(245, 158, 11, 0.08);
    box-shadow:
      0 0 0 3px rgba(245, 158, 11, 0.08),
      0 4px 20px rgba(0, 0, 0, 0.25);
    animation: heroScrollRingPulse 2.4s ease-in-out infinite;
    transition: border-color 0.25s, box-shadow 0.25s;
  }

  .hero__scroll-down-svg {
    display: block;
    overflow: visible;
  }

  .hero__scroll-down-chevron {
    opacity: 0.35;
  }

  .hero__scroll-down-chevron--1 {
    animation: heroScrollChevron 2s ease-in-out infinite;
  }

  .hero__scroll-down-chevron--2 {
    animation: heroScrollChevron 2s ease-in-out 0.35s infinite;
  }

  .hero__scroll-down-hint {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: 0.85;
    transition: color 0.25s, opacity 0.25s;
  }

  .hero__scroll-down:hover .hero__scroll-down-hint {
    color: #fcd34d;
    opacity: 1;
  }
}

@keyframes heroScrollRingPulse {
  0%, 100% {
    box-shadow:
      0 0 0 3px rgba(245, 158, 11, 0.06),
      0 4px 20px rgba(0, 0, 0, 0.25);
  }
  50% {
    box-shadow:
      0 0 0 6px rgba(245, 158, 11, 0.14),
      0 0 28px rgba(245, 158, 11, 0.22),
      0 4px 20px rgba(0, 0, 0, 0.25);
  }
}

@keyframes heroScrollChevron {
  0%, 100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__scroll-down-ring,
  .hero__scroll-down-chevron--1,
  .hero__scroll-down-chevron--2 {
    animation: none;
  }

  .hero__scroll-down-chevron {
    opacity: 0.85;
  }
}

.landing .hero__badge {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(59, 130, 246, 0.14));
  border-color: rgba(245, 158, 11, 0.35);
  color: #fcd34d;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
  font-size: 0.8rem;
  padding: 5px 10px;
}

.btn--cta {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 45%, #f97316 100%);
  color: #1a1208;
  border: none;
  box-shadow: 0 4px 22px rgba(245, 158, 11, 0.38);
  font-weight: 700;
}

.btn--cta:hover {
  background: linear-gradient(135deg, #fcd34d 0%, #fbbf24 45%, #fb923c 100%);
  color: #1a1208;
  box-shadow: 0 6px 28px rgba(245, 158, 11, 0.48);
}

.btn--huge {
  padding: 16px 32px;
  font-size: 1.12rem;
  border-radius: 12px;
}

.btn--register {
  border: 1.5px solid rgba(59, 130, 246, 0.55);
  background: rgba(59, 130, 246, 0.14);
  color: #bfdbfe;
  font-weight: 600;
}

.btn--register:hover {
  background: rgba(59, 130, 246, 0.26);
  border-color: rgba(96, 165, 250, 0.8);
  color: #e0f2fe;
}

.section-lead {
  color: var(--text-muted);
  margin: -12px 0 28px;
  max-width: 640px;
  line-height: 1.55;
}

/* ── PyBlocks-style blocks ── */

.pb-block {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  white-space: nowrap;
}

.pb-block--mini {
  padding: 5px 10px;
  font-size: 0.68rem;
}

.pb-block--start {
  background: linear-gradient(180deg, #34d399 0%, #22c55e 55%, #16a34a 100%);
  border-radius: 14px 6px 6px 6px;
  margin-top: 4px;
}

.pb-block--start::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 14px;
  width: 28px;
  height: 8px;
  background: inherit;
  border-radius: 6px 6px 0 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.pb-block--end {
  background: linear-gradient(180deg, #fb923c 0%, #f97316 55%, #ea580c 100%);
}

.pb-block--var {
  background: linear-gradient(180deg, #c06ba3 0%, #a55c81 55%, #8a4d6e 100%);
}

.pb-block--print {
  background: linear-gradient(180deg, #72c4a8 0%, #5ba58c 55%, #4a8770 100%);
}

.pb-block--if {
  background: linear-gradient(180deg, #7399c4 0%, #5c81a6 55%, #4a6785 100%);
  border-radius: 6px;
}

.pb-block--for,
.pb-block--while {
  background: linear-gradient(180deg, #72b872 0%, #5ca65c 55%, #4a854a 100%);
}

.pb-block__kw {
  font-weight: 700;
}

.pb-block__var {
  font-style: italic;
  opacity: 0.95;
}

.pb-block__slot {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 4px;
  padding: 2px 8px;
  font-weight: 600;
}

.pb-block--for .pb-block__slot,
.pb-block--while .pb-block__slot {
  background: rgba(0, 0, 0, 0.12);
}

.pb-block__op {
  opacity: 0.9;
}

/* ── Landing demo stage ── */

.landing-demo {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  width: 100%;
}

.landing-demo__stage {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 48px minmax(0, 1fr) 48px minmax(0, 0.95fr);
  gap: 8px;
  align-items: stretch;
  width: 100%;
}

.landing-demo__col {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}

.demo-panel__label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.landing-demo__col--blocks {
  position: relative;
  overflow: hidden;
}

.landing-blocks-preview {
  flex: 1;
  width: 100%;
  min-height: 0;
  border-radius: 8px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.landing-blocks-preview.guide-preview--mounted {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.landing-blocks-preview .guide-preview__host {
  width: 100%;
}

.landing-blocks-preview .blocklySvg,
.landing-blocks-preview .blocklyMainBackground {
  background: transparent !important;
}

.landing-blocks-preview .blocklyScrollbarHorizontal,
.landing-blocks-preview .blocklyScrollbarVertical,
.landing-blocks-preview .blocklyScrollbarBackground,
.landing-blocks-preview .blocklyScrollbarHandle {
  display: none !important;
}

/* Горизонтальные стрелки между колонками */
.demo-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  align-self: center;
  opacity: 0.15;
  color: var(--accent);
  width: 48px;
  flex-shrink: 0;
  padding: 0 2px;
}

.demo-connector__svg {
  display: block;
  overflow: visible;
  width: 36px;
  height: 22px;
}

.demo-connector__path,
.demo-connector__head {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.demo-connector__path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
}

.demo-connector__label {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
  line-height: 1.2;
  text-align: center;
}

.step-blocks-preview {
  width: 100%;
  max-width: 240px;
  min-height: 100px;
  margin: 0 auto;
  border-radius: 8px;
  background: #111827;
  border: 1px solid var(--border);
  overflow: hidden;
}

.step-blocks-preview.guide-preview {
  padding-top: 0;
}

.step-blocks-preview.guide-preview--mounted {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.step-blocks-preview .guide-preview__host {
  flex-shrink: 0;
}

.step-blocks-preview .blocklySvg,
.step-blocks-preview .blocklyMainBackground {
  background: transparent !important;
}

.step-blocks-preview .blocklyScrollbarHorizontal,
.step-blocks-preview .blocklyScrollbarVertical,
.step-blocks-preview .blocklyScrollbarBackground,
.step-blocks-preview .blocklyScrollbarHandle {
  display: none !important;
}

.landing-demo__col .code-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
}

.landing-demo__col .code-panel__pre {
  flex: 1;
}

.landing-demo__col .output-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.code-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.code-panel__pre {
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.55;
  margin: 0;
  flex: 1;
}

.code-line {
  display: block;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0;
  transform: translateX(-8px);
  line-height: 1.4;
  margin: 0;
}

.landing-demo .code-panel__pre code {
  display: block;
}

.tk-name { color: #93c5fd; }
.tk-op { color: #f9a8d4; }
.tk-str { color: #86efac; }
.tk-fn { color: #fcd34d; }

.demo-run-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  margin-top: 8px;
  padding: 5px 10px;
  background: var(--accent);
  border-radius: var(--radius);
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0;
  transform: scale(0.9);
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  border: none;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.demo-run-btn:hover {
  background: #2563eb;
  color: #fff;
}

.demo-run-btn:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

.demo-run-btn__icon {
  font-size: 0.7rem;
}

.output-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.output-panel__badge {
  align-self: flex-start;
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.35);
  margin-bottom: 10px;
  opacity: 0;
}

.output-panel__text {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text);
  margin: 0;
  min-height: 1.5em;
}

.demo-output-line {
  opacity: 0;
}

.demo-cursor {
  color: var(--accent);
  animation: cursorBlink 0.8s step-end infinite;
  opacity: 0;
}

/* ── Demo animation (12s loop, restarted via JS) ── */

.landing-demo:not(.is-static) .landing-blocks-preview,
.landing-demo:not(.is-static) .code-line,
.landing-demo:not(.is-static) .demo-run-btn,
.landing-demo:not(.is-static) .demo-connector,
.landing-demo:not(.is-static) .demo-output-badge,
.landing-demo:not(.is-static) .demo-output-line,
.landing-demo:not(.is-static) .demo-cursor {
  opacity: 0;
}

.landing-demo.is-animating .code-line {
  transform: translateX(-10px);
}

.landing-demo.is-animating .demo-run-btn {
  transform: scale(0.88);
}

.landing-demo.is-animating .landing-blocks-preview {
  animation: blockStackIn 0.7s cubic-bezier(0.34, 1.35, 0.64, 1) 0.25s forwards;
}

.landing-demo.is-animating .demo-connector--1 {
  animation: connectorIn 0.55s ease 2.8s forwards;
}

.landing-demo.is-animating .demo-connector--1 .demo-connector__path {
  animation: connectorDraw 0.7s ease 2.85s forwards;
}

.landing-demo.is-animating .demo-connector--2 {
  animation: connectorIn 0.55s ease 5.1s forwards;
}

.landing-demo.is-animating .demo-connector--2 .demo-connector__path {
  animation: connectorDraw 0.7s ease 5.15s forwards;
}

.landing-demo.is-animating .code-line--1 {
  animation: codeReveal 0.45s ease 3.2s forwards, codeRunLine 0.6s ease 5.75s forwards;
}

.landing-demo.is-animating .code-line--2 {
  animation: codeReveal 0.45s ease 3.65s forwards, codeRunLine 0.6s ease 6.4s forwards;
}

.landing-demo.is-animating .demo-run-btn {
  animation: runBtnPop 0.4s cubic-bezier(0.34, 1.4, 0.64, 1) 4.1s forwards,
    runBtnPulse 0.75s ease 4.7s 2;
}

.landing-demo.is-animating .demo-output-badge {
  animation: badgeRun 0.35s ease 5.6s forwards, badgeDone 0.35s ease 7.6s forwards;
}

.landing-demo.is-animating .demo-output-line {
  animation: outputReveal 0.45s ease 6.65s forwards;
}

.landing-demo.is-animating .demo-cursor {
  animation: fadeIn 0.2s ease 6.65s forwards, cursorBlink 0.75s step-end 6.85s infinite;
}

@keyframes blockStackIn {
  0% { opacity: 0; transform: translateY(16px) scale(0.94); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes connectorIn {
  to { opacity: 1; }
}

@keyframes connectorDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes codeReveal {
  to { opacity: 1; transform: translateX(0); }
}

@keyframes codeRunLine {
  0% { background: transparent; box-shadow: none; }
  20% { background: rgba(59, 130, 246, 0.3); box-shadow: inset 3px 0 0 var(--accent); }
  80% { background: rgba(59, 130, 246, 0.18); box-shadow: inset 3px 0 0 var(--accent); }
  100% { background: rgba(34, 197, 94, 0.12); box-shadow: inset 3px 0 0 var(--success); }
}

@keyframes runBtnPop {
  to { opacity: 1; transform: scale(1); }
}

@keyframes runBtnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.45); }
  50% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
}

@keyframes badgeRun {
  to { opacity: 1; }
}

@keyframes badgeDone {
  to {
    opacity: 1;
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.4);
  }
}

@keyframes outputReveal {
  to { opacity: 1; }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes cursorBlink {
  50% { opacity: 0; }
}

/* Static fallback when reduced motion */
.landing-demo.is-static .landing-blocks-preview,
.landing-demo.is-static .code-line,
.landing-demo.is-static .demo-run-btn,
.landing-demo.is-static .demo-connector,
.landing-demo.is-static .demo-output-line,
.landing-demo.is-static .demo-cursor,
.landing-demo.is-static .demo-output-badge {
  opacity: 1;
  transform: none;
}

.landing-demo.is-static .demo-connector__path {
  stroke-dashoffset: 0;
}

.landing-demo.is-static .code-line--2 {
  background: rgba(34, 197, 94, 0.12);
  box-shadow: inset 3px 0 0 var(--success);
}

.landing-demo.is-static .demo-output-badge {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.landing-demo.is-static .demo-cursor {
  display: none;
}

/* ── How it works — горизонтальная схема ── */

.steps-flow {
  margin-bottom: 72px;
}

.landing #how-it-works {
  scroll-margin-top: 40px;
}

.steps-flow__track {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.steps-flow__step {
  flex: 1 1 180px;
  max-width: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 24px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s, border-color 0.22s, box-shadow 0.22s;
}

.steps-flow__step:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

.steps-flow__icon {
  font-size: 2rem;
  line-height: 1;
}

.steps-flow__title {
  font-size: 1rem;
  font-weight: 700;
}

.steps-flow__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.steps-flow__arrow {
  align-self: center;
  font-size: 1.25rem;
  color: var(--warning);
  opacity: 0.85;
  flex-shrink: 0;
}

/* ── Мини-песочница на главной ── */

.landing-sandbox {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 16px;
  margin-bottom: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.landing-sandbox__task {
  grid-column: 1 / -1;
  padding: 12px 16px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 10px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.landing-sandbox__task strong {
  color: #93c5fd;
}

.landing-sandbox__task code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
}

.landing-sandbox__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.landing-sandbox__run,
.landing-sandbox__open {
  padding: 10px 20px;
  font-size: 0.92rem;
  font-weight: 700;
}

.landing-sandbox__run {
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.35);
}

.landing-sandbox__run:hover {
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.48);
}

.landing-sandbox__run:disabled {
  opacity: 0.7;
  cursor: wait;
}

.landing-sandbox__output {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.55;
  margin: 0;
  padding: 12px;
  min-height: 52px;
  background: #0a0f14;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #86efac;
  white-space: pre-wrap;
  word-break: break-word;
}

.landing-sandbox__output--error {
  color: #fca5a5;
}

.landing-sandbox__output--hint {
  color: #fcd34d;
}

.landing-sandbox__output--success {
  color: #86efac;
}

.landing-sandbox__output--running {
  color: var(--text-muted);
}

.landing-sandbox__output--idle {
  color: var(--text-muted);
}

.landing-sandbox__workspace-wrap,
.landing-sandbox__code-wrap {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.landing-sandbox__workspace {
  flex: 1;
  min-height: 220px;
  border-radius: 8px;
  overflow: hidden;
  background: #111827;
}

.landing-sandbox__workspace .blocklySvg,
.landing-sandbox__workspace .blocklyMainBackground {
  background: #111827 !important;
}

.landing-sandbox__code {
  flex: 1;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.65;
  margin: 0 0 12px;
  padding: 12px;
  background: #0a0f14;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.landing-sandbox__open {
  display: inline-flex;
  align-items: center;
}

.block-showcase__subtitle {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--text-muted);
}

/* ── Что вы научитесь делать ── */

.outcomes {
  margin-bottom: 72px;
}

.outcomes__list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.outcomes__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.outcomes__item code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 4px;
}

.outcomes__check {
  flex-shrink: 0;
  font-size: 1.2rem;
  line-height: 1.3;
}

/* ── Block gallery ── */

.block-showcase {
  margin-bottom: 72px;
}

.block-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.block-gallery__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.block-gallery__item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.block-gallery__code {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--surface-2);
  padding: 6px 10px;
  border-radius: 6px;
  width: 100%;
  text-align: center;
}

/* Scroll reveal */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cta-block code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 4px;
}

.cta-block .btn--register {
  margin-left: 8px;
}

.cta-block .btn--cta {
  margin-bottom: 4px;
}

.section-lead code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ── Responsive ── */

@media (max-width: 600px) {
  .hero__title-tagline {
    display: block;
    margin-top: 6px;
    white-space: normal;
  }
}

@media (max-width: 1100px) {
  .landing-demo__stage {
    grid-template-columns: minmax(0, 1fr) 40px minmax(0, 0.9fr) 40px minmax(0, 0.8fr);
    gap: 8px;
  }
}

@media (max-width: 960px) {
  .landing-demo__stage {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto auto auto auto;
    gap: 10px;
  }

  .demo-connector {
    flex-direction: row;
    padding: 4px 0;
  }

  .demo-connector__svg {
    transform: rotate(90deg);
  }

  .landing-sandbox {
    grid-template-columns: 1fr;
  }

  .steps-flow__arrow {
    display: none;
  }

  .steps-flow__track {
    flex-direction: column;
    align-items: stretch;
  }

  .steps-flow__step {
    max-width: none;
  }
}

@media (max-width: 768px) {
  .landing .hero--landing {
    margin-bottom: 40px;
    gap: 24px;
  }

  .landing-demo__stage {
    min-height: auto;
  }

  .landing-demo__col {
    min-height: 120px;
  }

  .landing-blocks-preview {
    min-height: 160px;
  }

  .cta-block .btn--register {
    margin-left: 0;
    margin-top: 10px;
    display: inline-flex;
  }

  .hero__actions--cta {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .hero__cta-row {
    flex-direction: column;
  }

  .landing-demo__col--blocks,
  .landing-demo__col--code,
  .landing-demo__col--output {
    padding: 10px;
  }

  .demo-panel__label {
    font-size: 0.68rem;
    margin-bottom: 8px;
  }

  .code-panel__pre {
    font-size: 0.75rem;
  }

  .output-panel__text {
    font-size: 0.78rem;
  }

  .demo-connector__label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-demo.is-animating * {
    animation: none !important;
  }
}
