/* Live coding marketing landing — layout on shared home-landing dark theme */

.live-coding-landing {
  position: relative;
  overflow-x: clip;
}

.live-coding-landing .home-landing__grid-bg {
  mask-image: linear-gradient(to bottom, black 0%, black 78%, transparent 100%);
}

.live-coding-hero {
  padding-top: clamp(2rem, 5vw, 3.5rem);
  padding-bottom: clamp(2rem, 5vw, 3rem);
}

.live-coding-landing .live-coding-benefits {
  padding-top: clamp(1.1rem, 2.6vw, 1.85rem);
}

.live-coding-benefits .home-section-sub {
  max-width: none;
  width: 100%;
}

.live-coding-landing .live-coding-demo-section,
.live-coding-landing .live-coding-flow,
.live-coding-landing .live-coding-cta {
  padding-top: clamp(1.1rem, 2.6vw, 1.85rem);
}

@media (max-width: 767.98px) {
  /* Hero mock duplicates the product demo below — keep copy/CTAs only. */
  body.landing-live-coding .live-coding-hero .landing-hero__media {
    display: none;
  }

  .live-coding-landing .live-coding-flow {
    padding-top: clamp(0.85rem, 2.2vw, 1.25rem);
  }

  .live-coding-landing .live-coding-flow .home-section-title {
    margin-bottom: 0.85rem;
  }

  /*
    3 short steps: horizontal snap rail (not a stacked wall, not a full autoplay slider).
    Peek of the next card = swipe affordance; step badges stay on titles.
  */
  .live-coding-flow__grid.home-compare {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.65rem;
    grid-template-columns: none;
    margin-top: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.15rem 0.1rem 0.4rem;
    border-radius: 0;
  }

  .live-coding-flow__grid.home-compare::-webkit-scrollbar {
    display: none;
  }

  .live-coding-flow__grid.home-compare > .home-compare__col {
    flex: 0 0 min(78vw, 17.5rem);
    width: min(78vw, 17.5rem);
    max-width: min(78vw, 17.5rem);
    scroll-snap-align: start;
    border: 1px solid rgba(148, 163, 184, 0.16) !important;
    border-radius: 1.1rem;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 30%),
      linear-gradient(145deg, rgba(17, 24, 39, 0.96), rgba(10, 14, 20, 0.92));
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.05) inset,
      0 12px 28px rgba(0, 0, 0, 0.24);
  }

  .live-coding-flow__grid.home-compare > .home-compare__col + .home-compare__col {
    border-top: 1px solid rgba(148, 163, 184, 0.16) !important;
  }

  .live-coding-landing .live-coding-benefits .home-section-sub {
    display: none;
  }

  .live-coding-landing .live-coding-benefits .home-section-title {
    margin-bottom: 0.85rem;
  }

  .live-coding-benefits__grid.home-cards-grid {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.65rem;
    grid-template-columns: none;
    margin-top: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.15rem 0.1rem 0.4rem;
  }

  .live-coding-benefits__grid.home-cards-grid::-webkit-scrollbar {
    display: none;
  }

  .live-coding-benefits__grid.home-cards-grid > .home-card {
    flex: 0 0 min(78vw, 17.5rem);
    width: min(78vw, 17.5rem);
    max-width: min(78vw, 17.5rem);
    scroll-snap-align: start;
    height: auto;
  }
}

body.landing-live-coding .landing-hero__media .home-hero-stage--live {
  position: relative;
  z-index: 1;
}

.home-hero-stage--live .home-hero-stage__layout {
  grid-template-columns: minmax(7.2rem, 0.38fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

.lch-statement {
  grid-column: 1;
  grid-row: 1;

  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(15, 23, 42, 0.55);
}

.lch-statement__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 0.55rem 0.6rem 0.6rem;
}

.lch-statement__text {
  margin: 0 0 0.45rem;
  font-size: 0.66rem;
  line-height: 1.45;
  color: #c5cedb;
}

.lch-statement__ex {
  margin: 0;
  padding: 0.38rem 0.45rem;
  border-radius: 0.5rem;
  background: #2b2b2b;
  border: 1px solid rgba(148, 163, 184, 0.14);
  font-family: Consolas, Monaco, "Courier New", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.58rem;
  line-height: 1.4;
  color: #a9b7c6;
}

.lch-badge {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  margin-left: auto;
  min-height: 1.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(45, 212, 191, 0.45);
  background: rgba(45, 212, 191, 0.12);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #ecfdf5;
}

.lch-badge--lang {
  margin-left: 0.35rem;
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.05);
  color: #e5e7eb;
  text-transform: none;
  letter-spacing: 0;
}

.home-hero-stage--live .home-hero-stage__crumbs {
  flex: 1 1 auto;
}

.home-hero-stage--live .home-hero-stage__main {
  grid-column: 2;
  grid-row: 1;
  min-height: 0;
}

.home-hero-stage--live .lch-workspace {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0.55rem 0.65rem 0.5rem;
}

.home-hero-stage--live .home-hero-stage__ace {
  flex: 1 1 auto;
  height: auto;
  min-height: 5.4rem;
  max-height: none;
}

.home-hero-stage--live .home-hero-stage__source > div:not(.is-on) {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.home-hero-stage--live .home-hero-stage__source > div.is-on {
  max-height: 1.5em;
  opacity: 1;
}

[data-live-coding-hero-demo].is-anim .home-hero-stage--live .home-hero-stage__source > div,
[data-live-coding-hero-demo].is-anim .home-hero-stage--live .home-hero-stage__gutter li {
  transition: max-height 0.35s ease, opacity 0.35s ease;
}

.home-hero-stage--live .home-hero-stage__gutter li {
  opacity: 0.22;
}

.home-hero-stage--live .home-hero-stage__gutter li.is-on {
  opacity: 1;
}

.lch-out {
  flex-shrink: 0;
  max-height: 0;
  margin: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  border-radius: 0.55rem;
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.14);
  transition: max-height 0.45s ease, opacity 0.35s ease, margin 0.45s ease;
}

.lch-out.is-on {
  max-height: 3.6rem;
  margin-top: 0.4rem;
  opacity: 1;
  visibility: visible;
}

.lch-out.is-ok {
  border-color: rgba(134, 239, 172, 0.45);
  background: rgba(22, 163, 74, 0.18);
}

.lch-out.is-bad {
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(127, 29, 29, 0.32);
}

.lch-out__kicker {
  margin: 0.32rem 0.5rem 0.12rem;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2dd4bf;
}

.lch-out.is-ok .lch-out__kicker,
.lch-out.is-bad .lch-out__kicker {
  color: #bbf7d0;
  display: none;
}

.lch-out__run,
.lch-out__ok,
.lch-out__fail {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.5rem 0.35rem;
  font-family: Consolas, Monaco, "Courier New", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.64rem;
  line-height: 1.35;
  color: #e5e7eb;
}

.lch-out__run[hidden],
.lch-out__ok[hidden],
.lch-out__fail[hidden] {
  display: none !important;
}

.lch-out__ok {
  font-weight: 700;
  color: #ecfdf5;
}

.lch-out__fail {
  font-weight: 700;
  color: #fecaca;
}

.lch-sandbox-status {
  margin: 0.45rem 0 0;
  font-size: 0.62rem;
  line-height: 1.35;
  color: #9ca3af;
}

.lch-sandbox-status[hidden] {
  display: none !important;
}

.home-hero-stage--live .home-hero-stage__btn-ghost.is-busy {
  cursor: wait;
  opacity: 0.88;
  pointer-events: none;
}

.home-hero-stage--live .home-hero-stage__btn-ghost.is-busy::before {
  content: "";
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  margin-right: 0.35em;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: lch-run-spin 0.85s linear infinite;
  vertical-align: -0.05em;
}

@keyframes lch-run-spin {
  to {
    transform: rotate(360deg);
  }
}

.home-hero-stage--live .home-hero-stage__btn-ghost.is-pulse,
.home-hero-stage--live .home-hero-stage__btn-primary.is-pulse {
  animation: lch-btn-pulse 0.95s ease-in-out infinite;
}

[data-live-coding-hero-demo]:not(.is-anim) .home-hero-stage__btn-ghost.is-pulse,
[data-live-coding-hero-demo]:not(.is-anim) .home-hero-stage__btn-primary.is-pulse,
[data-live-coding-cycle-demo]:not(.is-anim) .home-hero-stage__btn-ghost.is-pulse,
[data-live-coding-cycle-demo]:not(.is-anim) .home-hero-stage__btn-primary.is-pulse {
  animation-play-state: paused;
}

@keyframes lch-btn-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0);
    filter: brightness(1);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.22);
    filter: brightness(1.12);
  }
}

.lch-tutor {
  flex-shrink: 0;
  z-index: 5;
  max-height: 0;
  margin: 0;
  overflow: hidden;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  background: #0f172a;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: max-height 0.75s ease, opacity 0.5s ease;
}

.lch-tutor.is-open {
  max-height: 12.25rem;
  opacity: 1;
  visibility: visible;
}

.lch-tutor .home-hero-stage__tutor {
  flex: none;
  max-height: 12rem;
  border-top: 0;
  background: #0f172a;
}

.lch-tutor .home-hero-stage__log {
  min-height: 4.8rem;
  max-height: 8rem;
  justify-content: flex-end;
}

[data-live-coding-hero-demo]:not(.is-anim) .home-hero-stage--live .home-hero-stage__source > div,
[data-live-coding-hero-demo]:not(.is-anim) .lch-out,
[data-live-coding-hero-demo]:not(.is-anim) .lch-tutor,
[data-live-coding-cycle-demo]:not(.is-anim) .home-hero-stage--live .home-hero-stage__source > div,
[data-live-coding-cycle-demo]:not(.is-anim) .lch-out,
[data-live-coding-cycle-demo]:not(.is-anim) .lch-tutor {
  transition: none;
}

@media (max-width: 575.98px) {
  .home-hero-stage--live .home-hero-stage__layout {
    grid-template-columns: 1fr;
  }

  .lch-statement {
    display: none;
  }

  .lch-badge {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero-stage--live .home-hero-stage__btn-ghost.is-pulse,
  .home-hero-stage--live .home-hero-stage__btn-primary.is-pulse,
  .home-hero-stage--live .home-hero-stage__btn-ghost.is-busy::before {
    animation: none;
  }
    animation: none;
  }

  .lch-out,
  .lch-tutor {
    transition: none;
  }
}

.live-coding-hero__actions .home-btn-primary,
.live-coding-hero__actions .home-btn-ghost,
.live-coding-cta__actions .home-btn-primary,
.live-coding-cta__actions .home-btn-ghost {
  text-decoration: none;
}

.live-coding-benefits__grid.home-cards-grid,
.live-coding-flow__grid.home-compare {
  margin-top: clamp(1.25rem, 3vw, 2rem);
}

.live-coding-flow__grid.home-compare {
  grid-template-columns: 1fr;
}

@media (min-width: 992px) {
  .live-coding-flow__grid.home-compare {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }
}

.live-coding-cycle {
  max-width: 58rem;
  margin: 1.5rem auto 0;
}

.home-hero-stage--cycle {
  height: 32rem;
}

[data-live-coding-cycle-demo] .lch-statement__text,
[data-live-coding-cycle-demo] .lch-statement__ex {
  opacity: 0.38;
  transform: translate3d(0, 3px, 0);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

[data-live-coding-cycle-demo] .lch-statement__text.is-read,
[data-live-coding-cycle-demo] .lch-statement__ex.is-read {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

[data-live-coding-cycle-demo]:not(.is-anim) .lch-statement__text,
[data-live-coding-cycle-demo]:not(.is-anim) .lch-statement__ex {
  transition: none;
}

[data-live-coding-cycle-demo].is-anim .home-hero-stage--live .home-hero-stage__source > div,
[data-live-coding-cycle-demo].is-anim .home-hero-stage--live .home-hero-stage__gutter li {
  transition: max-height 0.35s ease, opacity 0.35s ease;
}

.live-coding-demo__note {
  margin: 0.9rem 0 0;
  font-size: 1.0625rem;
  line-height: 1.55;
  letter-spacing: 0.01em;
  text-align: center;
  color: var(--home-muted, #9ca3af);
}

@media (max-width: 991.98px) {
  .home-hero-stage--cycle {
    height: 28rem;
  }
}

.live-coding-cta__strip {
  text-align: center;
}

.live-coding-cta__actions {
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

@media (max-width: 767.98px) {
  .live-coding-cta__actions {
    flex-direction: column;
    align-items: stretch;
    max-width: 18rem;
    margin-left: auto;
    margin-right: auto;
  }

  .live-coding-cta__actions .home-btn-primary,
  .live-coding-cta__actions .home-btn-ghost {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}
