/* Landing page: vertical sections with dividers (no scroll-snap). */

.landing-page {
  width: 100%;
}

.landing-block__inner,
.landing-hero__inner {
  margin-inline: auto;
  width: 100%;
  /* Match base.html main + nav: max-w-screen-2xl (96rem) */
  max-width: 96rem;
}

.landing-block__inner {
  padding: 4rem 1rem;
}

/* Shared intro width for section headings and body copy. */
.landing-section-intro {
  max-width: 56rem;
}

.landing-section-copy {
  max-width: 56rem;
}

.landing-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #0f172a;
  background-image:
    radial-gradient(ellipse 90% 70% at 85% 25%, rgba(56, 189, 248, 0.14), transparent 55%),
    radial-gradient(ellipse 70% 60% at 15% 85%, rgba(167, 139, 250, 0.1), transparent 50%),
    linear-gradient(155deg, #0f172a 0%, #1e293b 42%, #0f172a 100%);
}

.landing-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.875rem;
  align-items: center;
  padding-block: 1rem;
  padding-inline: 1rem;
}

@media (min-width: 640px) {
  .landing-block__inner {
    padding-inline: 1.5rem;
  }

  .landing-hero__inner {
    padding-inline: 1.5rem;
    padding-block: 1.25rem;
    gap: 1rem;
  }
}

@media (min-width: 1024px) {
  .landing-block__inner {
    padding-inline: 2rem;
  }
}

@media (min-width: 1200px) {
  .landing-hero__inner {
    padding-block: 1.25rem;
    padding-inline: 2rem;
  }
}

@media (min-width: 1280px) {
  .landing-hero__inner {
    grid-template-columns: minmax(0, 0.74fr) minmax(0, 1.26fr);
    gap: 1rem;
    padding-block: 1.25rem;
    padding-inline: 2rem;
  }
}

@media (min-width: 1440px) {
  .landing-hero__inner {
    gap: 1rem 1.25rem;
  }
}

.landing-hero__content {
  order: 1;
  min-width: 0;
  container-type: inline-size;
}

.landing-hero__tagline {
  font-size: 1.125rem;
  line-height: 1.45;
  text-wrap: pretty;
}

@media (min-width: 640px) {
  .landing-hero__tagline {
    font-size: 1.25rem;
  }
}

@media (min-width: 1200px) {
  .landing-hero__tagline {
    font-size: 1.3125rem;
    line-height: 1.35;
  }
}

@media (min-width: 1280px) {
  .landing-hero__tagline {
    font-size: 1.4375rem;
  }
}

/* One line only when the text column is actually wide enough (avoids overlap). */
@container (min-width: 33rem) {
  .landing-hero__tagline {
    text-wrap: nowrap;
  }
}

.landing-hero__lede {
  font-size: 1.125rem;
  line-height: 1.6;
  text-wrap: pretty;
}

@media (min-width: 1200px) {
  .landing-hero__lede {
    font-size: 1.1875rem;
    line-height: 1.6;
  }
}

.landing-hero__visual {
  order: 2;
  width: 100%;
  min-width: 0;
}

/* Square stage — layout only; alpha WebM shows the hero gradient underneath. */
.landing-hero__stage {
  position: relative;
  width: min(100%, 88%);
  max-width: 100%;
  aspect-ratio: 1;
  margin-inline: auto;
  background: transparent;
}

.landing-hero__slides,
.landing-hero__slide {
  background: transparent;
}

@media (min-width: 1280px) {
  .landing-hero__stage {
    width: min(100%, min(68vh, 46rem));
    margin-inline: auto;
  }
}

.landing-hero__slides {
  position: absolute;
  inset: 0;
}

.landing-hero__playpause {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(15, 23, 42, 0.55);
  color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.landing-hero__playpause:hover {
  background: rgba(15, 23, 42, 0.75);
  border-color: rgba(255, 255, 255, 0.45);
}

.landing-hero__playpause-icon {
  width: 1rem;
  height: 1rem;
}

.landing-hero__playpause [hidden] {
  display: none;
}

.landing-hero__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.landing-hero__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.landing-hero__slide video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: transparent;
}

.landing-hero__controls {
  position: absolute;
  z-index: 3;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.landing-hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(15, 23, 42, 0.45);
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.landing-hero__btn:hover {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(255, 255, 255, 0.45);
}

.landing-hero__dots {
  display: flex;
  gap: 0.5rem;
}

.landing-hero__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  padding: 0;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.landing-hero__dot.is-active {
  background: #fff;
  transform: scale(1.15);
}

.landing-pipeline-step {
  position: relative;
}

.landing-pipeline-step::after {
  display: none;
  content: "";
  position: absolute;
  top: 2rem;
  right: -1rem;
  width: 2rem;
  height: 2px;
  background: linear-gradient(to right, #cbd5e1, transparent);
}

@media (min-width: 768px) {
  .landing-pipeline-step:not(:last-child)::after {
    display: block;
  }
}

.landing-formula {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.6;
  overflow-x: auto;
}

/* Comparison block: pill nav + unified side-by-side stage. */

.landing-comparison__nav {
  max-width: 56rem;
}

.landing-comparison__pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}

.landing-comparison__pill-divider {
  flex: 0 0 auto;
  width: 1px;
  height: 1.25rem;
  margin-inline: 0.125rem;
  background: #cbd5e1;
}

.landing-comparison__pill {
  flex: 0 0 auto;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  background-color: #fff;
  padding: 0.4375rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.25;
  color: #475569;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.landing-comparison__pill:hover {
  color: #0f172a;
  border-color: #94a3b8;
  background: #f8fafc;
}

.landing-comparison__pill.is-active {
  color: #fff;
  border-color: #0f172a;
  background: #0f172a;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.16);
}

.landing-comparison__panels {
  width: 100%;
}

.landing-comparison__panel {
  margin: 0;
}

.landing-comparison__panel[hidden] {
  display: none;
}

.landing-comparison__stage {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  background:
    linear-gradient(180deg, #fafafa 0%, #f8fafc 100%);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 32px rgba(15, 23, 42, 0.06);
}

.landing-comparison__pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.landing-comparison__pane--primo {
  border-top: 1px solid #e2e8f0;
  background: linear-gradient(180deg, rgba(224, 242, 254, 0.35) 0%, rgba(248, 250, 252, 0.2) 100%);
}

.landing-comparison__pane-caption {
  margin: 0;
  padding: 0.75rem 1rem 0.375rem;
  text-align: center;
  font-size: 0.9375rem;
  line-height: 1.25;
  text-wrap: balance;
  color: #334155;
}

.landing-comparison__pane-caption-muted {
  font-weight: 500;
  color: #64748b;
}

.landing-comparison__pane-caption-strong {
  font-weight: 600;
  color: #0f172a;
}

.landing-comparison__pane-caption--primo {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0369a1;
}

.landing-comparison__image-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0.375rem 1rem 1.25rem;
}

.landing-comparison__image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: clamp(12rem, 42vw, 22rem);
  object-fit: contain;
}

.landing-comparison__caption {
  max-width: 56rem;
  margin-top: 1.25rem;
}

.landing-comparison__meta {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #0f172a;
}

.landing-comparison__copy {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #475569;
}

@media (max-width: 639px) {
  .landing-comparison__pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: -0.25rem;
    padding: 0.125rem 0.25rem 0.375rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .landing-comparison__pill {
    border-color: #94a3b8;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  }

  .landing-comparison__pill.is-active {
    background-color: #0f172a;
  }

  /* One outer stage frame only — caption bands, no nested borders. */
  .landing-comparison__pane-caption {
    padding: 0.75rem 1rem 0.375rem;
    background: #f1f5f9;
  }

  .landing-comparison__pane--primo .landing-comparison__pane-caption {
    background: #f1f5f9;
  }

  .landing-comparison__pane--primo {
    border-top: 1px solid #e2e8f0;
    background: #fff;
  }

  .landing-comparison__image-wrap {
    padding: 0.375rem 1rem 1rem;
  }

  .landing-comparison__pane:last-child .landing-comparison__image-wrap {
    padding-bottom: 1.25rem;
  }
}

@media (min-width: 640px) {
  .landing-comparison__pane-caption {
    font-size: 1rem;
    padding: 0.875rem 1rem 0.5rem;
  }

  .landing-comparison__pill {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }

  .landing-comparison__stage {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .landing-comparison__pane--primo {
    border-top: none;
    border-left: 1px solid #e2e8f0;
  }

  .landing-comparison__image-wrap {
    padding: 0.5rem 1.25rem 1.5rem;
  }

  .landing-comparison__image {
    max-height: clamp(14rem, 36vw, 24rem);
  }
}

@media (min-width: 1024px) {
  .landing-comparison__image {
    max-height: 26rem;
  }
}

/* Black-box metrics block */

.landing-metrics__figure {
  margin: 0;
}

.landing-metrics__figure-wrap {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.landing-metrics__image {
  display: block;
  width: 100%;
  height: auto;
}

/* Python package block: modern terminal windows. */

.landing-package {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(56, 189, 248, 0.07), transparent 70%),
    #f8fafc;
}

.landing-terminal-grid {
  display: grid;
  gap: 1.75rem;
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .landing-terminal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    align-items: stretch;
  }
}

.landing-terminal {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
}

@media (min-width: 768px) {
  .landing-terminal {
    height: 100%;
  }
}

.landing-terminal__meta {
  flex: 0 0 auto;
}

.landing-terminal__title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #0f172a;
}

.landing-terminal__desc {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #64748b;
}

.landing-terminal__shell {
  position: relative;
  overflow: hidden;
  border: 1px solid #1e293b;
  border-radius: 0.875rem;
  background: #0f172a;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.12),
    0 16px 36px -20px rgba(15, 23, 42, 0.45);
}

@media (min-width: 768px) {
  .landing-terminal__shell {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
  }
}

.landing-terminal__copy {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.72);
  color: #94a3b8;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.landing-terminal__copy:hover {
  border-color: rgba(148, 163, 184, 0.38);
  background: rgba(30, 41, 59, 0.92);
  color: #e2e8f0;
}

.landing-terminal__copy.is-copied {
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(22, 101, 52, 0.45);
  color: #bbf7d0;
}

.landing-terminal__copy.is-copy-failed {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

.landing-terminal__copy-icon {
  width: 1rem;
  height: 1rem;
}

.landing-terminal__copy-icon[hidden] {
  display: none;
}

.landing-terminal__code {
  margin: 0;
  padding: 1rem 3.25rem 1.125rem 1.125rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
  line-height: 1.65;
  tab-size: 2;
  color: #cbd5e1;
  white-space: pre;
  background: #0f172a;
}

@media (min-width: 768px) {
  .landing-terminal__code {
    flex: 1 1 auto;
  }
}

.landing-terminal__code code {
  font: inherit;
  color: inherit;
}

.landing-code-hl-cmd {
  color: #7dd3fc;
  font-weight: 600;
}

.landing-code-hl-kw {
  color: #c4b5fd;
}

.landing-code-hl-flag {
  color: #86efac;
}

.landing-code-hl-op {
  color: #64748b;
}

.landing-code-hl-arg {
  color: #fde68a;
}

.landing-code-hl-cont {
  color: #94a3b8;
}

.landing-code-hl-num {
  color: #fcd34d;
}

.landing-code-hl-entry {
  color: #f9a8d4;
  font-weight: 600;
}

.landing-code-hl-pkg {
  color: #fda4af;
}

.landing-code-hl-comment {
  color: #64748b;
  font-style: italic;
}

.landing-code-hl-string {
  color: #fde68a;
}

.landing-code-hl-type {
  color: #7dd3fc;
}

@media (min-width: 640px) {
  .landing-terminal__code {
    font-size: 0.84375rem;
  }
}

/* Operator visual-assessment table (paper Table 1-style summary). */

.landing-benchmark__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  font-size: 0.875rem;
  color: #475569;
}

.landing-benchmark__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.landing-benchmark__layout-note {
  flex: 1 1 100%;
  margin: 0.125rem 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #64748b;
}

.landing-benchmark__table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 8px 20px -16px rgba(15, 23, 42, 0.16);
}

.landing-benchmark__table {
  width: 100%;
  min-width: 48rem;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.landing-benchmark__th,
.landing-benchmark__row-head {
  padding: 0.5rem 0.5rem;
  text-align: center;
  vertical-align: bottom;
  border-bottom: 1px solid #e2e8f0;
}

.landing-benchmark__th--dataset,
.landing-benchmark__row-head {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 10rem;
  text-align: left;
  background: #fff;
  box-shadow: 1px 0 0 #e2e8f0;
}

.landing-benchmark__th-title {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
  color: #0f172a;
}

.landing-benchmark__th-sub {
  display: block;
  margin-top: 0.0625rem;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.2;
  color: #64748b;
}

.landing-benchmark__th--primo {
  background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
}

.landing-benchmark__method-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.landing-benchmark__method-link:hover .landing-benchmark__th-title {
  color: #0369a1;
}

.landing-benchmark__th--primo .landing-benchmark__th-title {
  color: #0c4a6e;
}

.landing-benchmark__row-head {
  vertical-align: middle;
  font-weight: 500;
}

.landing-benchmark__dataset-name {
  display: block;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.25;
}

.landing-benchmark__dataset-modality {
  display: block;
  margin-top: 0.0625rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
}

.landing-benchmark__group-row td {
  padding: 0.375rem 0.5rem;
  background: #f8fafc;
  border-top: 2px solid #cbd5e1;
  border-bottom: 1px solid #e2e8f0;
}

.landing-benchmark__group-row:first-child td {
  border-top: none;
}

.landing-benchmark__group-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.landing-benchmark__cell {
  padding: 0.375rem 0.375rem;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}

.landing-benchmark__cell--primo {
  background: #f8fcff;
}

.landing-benchmark__pair {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
}

.landing-benchmark__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.landing-benchmark__mark--success {
  color: #166534;
  background: #dcfce7;
}

.landing-benchmark__mark--partial {
  color: #92400e;
  background: #fef3c7;
}

.landing-benchmark__mark--fail {
  color: #991b1b;
  background: #fee2e2;
}

.landing-benchmark__mark--na {
  color: #94a3b8;
  background: #f1f5f9;
}

@media (max-width: 639px) {
  .landing-benchmark__table-wrap {
    margin-inline: -1rem;
    border-radius: 0.5rem;
  }

  .landing-benchmark__table {
    min-width: 44rem;
    font-size: 0.8125rem;
  }

  .landing-benchmark__th--dataset,
  .landing-benchmark__row-head {
    min-width: 8.5rem;
  }

  .landing-benchmark__th,
  .landing-benchmark__row-head,
  .landing-benchmark__cell {
    padding: 0.375rem 0.375rem;
  }

  .landing-benchmark__th-title {
    font-size: 0.75rem;
  }

  .landing-benchmark__th-sub {
    font-size: 0.625rem;
  }
}

@media (min-width: 1024px) {
  .landing-benchmark__table {
    font-size: 0.9375rem;
  }

  .landing-benchmark__th-title {
    font-size: 0.875rem;
  }

  .landing-benchmark__layout-note {
    font-size: 0.875rem;
  }

  .landing-benchmark__th,
  .landing-benchmark__row-head,
  .landing-benchmark__cell {
    padding-inline: 0.625rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-hero__slide {
    transition: none;
  }

  .landing-comparison__pill {
    transition: none;
  }

  .landing-terminal__copy {
    transition: none;
  }

  .landing-benchmark__method-link {
    transition: none;
  }
}
