/* Landing page styles. */

.home-hero {
  padding: 56px 0 28px;
  max-width: var(--max-w);
}
.home-hero h1 {
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 14px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
.home-hero h1 em {
  font-style: normal;
  color: var(--accent);
  font-family: inherit;
}
.home-hero__sub {
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  color: var(--fg-1);
  max-width: 720px;
  margin-bottom: 32px;
}

/* Live demo slider --------------------------------------------------------- */
.home-demo {
  position: relative;
  width: 100%;
  aspect-ratio: 1440 / 900;
  border-radius: 10px;
  overflow: hidden;
  --split: 50%;
  /* Light backdrop so agent screenshots with transparent/short areas
     don't show a dark gap. Was #0e0e0e; the gpt-oss-120b clone of
     arxiv used for the demo doesn't fill the full aspect-ratio. */
  background: var(--bg, #fbf7eb);
  cursor: col-resize;
  user-select: none;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.home-demo__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
}
.home-demo__img--left  { clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.home-demo__img--right { clip-path: inset(0 0 0 var(--split)); }
.home-demo__divider {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--split);
  width: 2px;
  background: rgba(255,255,255,0.92);
  transform: translateX(-50%);
  pointer-events: none;
}
.home-demo__divider::after {
  content: "⇆";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #fff;
  color: var(--fg-0);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 1.4rem; font-weight: 600;
  display: grid; place-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}
.home-demo__lbl {
  position: absolute;
  top: 12px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(0,0,0,0.6); color: #fff;
  padding: 4px 8px; border-radius: 4px;
  pointer-events: none;
}
.home-demo__lbl--left  { left: 12px; }
.home-demo__lbl--right { right: 12px; }
.home-demo__hint {
  position: absolute;
  bottom: 12px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.6); color: #fff;
  font-size: 0.78rem;
  padding: 4px 12px; border-radius: 999px;
  pointer-events: none;
  opacity: 0.9;
}
.home-demo__caption {
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.78); color: #fff;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  padding: 4px 12px; border-radius: 999px;
  text-decoration: none;
  z-index: 4;
  opacity: 0; pointer-events: none;
  transition: opacity 220ms ease;
}
.home-demo__caption[hidden] { display: none; }
.home-demo:hover .home-demo__caption { opacity: 1; pointer-events: auto; }
.home-demo__caption:hover { background: var(--accent); text-decoration: none; }

/* Highlights reel --------------------------------------------------------- */
.home-highlights { margin: 28px 0 0; }
.home-highlights__head {
  font-size: 1.1rem;
  font-weight: 600;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  margin-bottom: 12px;
  display: flex; align-items: baseline; gap: 12px;
}
.home-highlights__head small {
  color: var(--fg-2);
  font-size: 0.78rem;
  font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.home-highlights__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.home-highlight {
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden;
  transition: border-color 80ms ease, transform 80ms ease;
}
.home-highlight:hover { border-color: var(--accent); transform: translateY(-1px); text-decoration: none; }
.home-highlight__lbl {
  padding: 10px 14px 6px;
  color: var(--fg-2);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.home-highlight--best  .home-highlight__lbl { color: #2a7a3f; }
.home-highlight--worst .home-highlight__lbl { color: #b73a3a; }
.home-highlight__pair {
  position: relative;
  aspect-ratio: 1440 / 540;
  background: #0e0e0e;
  --split: 50%;
  overflow: hidden;
}
.home-highlight__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
}
.home-highlight__img--left  { clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.home-highlight__img--right { clip-path: inset(0 0 0 var(--split)); }
.home-highlight__divider {
  position: absolute; top: 0; bottom: 0; left: var(--split);
  width: 1px; background: rgba(255,255,255,0.6);
  transform: translateX(-50%); pointer-events: none;
}
.home-highlight__caption {
  padding: 10px 14px;
  display: flex; align-items: baseline; gap: 10px; justify-content: space-between;
  border-top: 1px solid var(--line);
}
.home-highlight__id {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.92rem; font-weight: 600; color: var(--fg-0);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.home-highlight__diff {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.92rem; font-weight: 600;
  white-space: nowrap;
}
.home-highlight--best  .home-highlight__diff { color: #2a7a3f; }
.home-highlight--worst .home-highlight__diff { color: #b73a3a; }

@media (max-width: 720px) {
  .home-highlights__row { grid-template-columns: 1fr; }
}

/* Auto-generated insights blurb -------------------------------------------- */
.home-insights {
  margin: 28px 0 0;
  padding: 16px 20px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 10px;
  border-left: 3px solid var(--accent);
}
.home-insights__line {
  margin: 0;
  color: var(--fg-1);
  font-size: 0.95rem;
  line-height: 1.55;
}
.home-insights__line b { color: var(--fg-0); }

/* Heatmap — 10 bundles × 6 cells = 60-cell glance ------------------------ */
.home-heatmap { margin: 28px 0 0; }
.home-heatmap__head {
  font-size: 1.1rem; font-weight: 600;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  margin-bottom: 8px;
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.home-heatmap__head small {
  color: var(--fg-2); font-weight: 400; font-size: 0.78rem;
}
.home-heatmap__legend {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 0.78rem; color: var(--fg-1);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  margin-bottom: 10px;
}
.home-heatmap__sw {
  display: inline-block;
  width: 10px; height: 10px;
  margin-right: 6px;
  vertical-align: middle;
  border-radius: 2px;
}
.home-heatmap__sw--good { background: #2a7a3f; }
.home-heatmap__sw--mid  { background: #b88a14; }
.home-heatmap__sw--bad  { background: #b73a3a; }
.home-heatmap__toggle {
  margin-left: auto;
  display: inline-flex; gap: 6px; align-items: center;
  font-size: 0.78rem; color: var(--fg-1);
  cursor: pointer;
  user-select: none;
}
.home-heatmap__grid.is-only-bad .home-heatmap__cell:not(.home-heatmap__cell--bad) {
  opacity: 0.18;
  filter: saturate(0);
}
.home-heatmap__grid {
  display: grid;
  grid-template-columns: 130px repeat(6, 1fr) 50px;
  gap: 3px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
}
.home-heatmap__cell--mean {
  background: var(--bg-2);
  color: var(--fg-0);
  font-weight: 700;
  margin-left: 6px;
  cursor: default;
  border: 1px solid var(--line);
}
.home-heatmap__row-lbl--total {
  font-weight: 700;
  color: var(--fg-0);
  border-top: 2px solid var(--line);
  padding-top: 4px;
  margin-top: 4px;
}
.home-heatmap__hdr {
  color: var(--fg-2);
  text-transform: uppercase; letter-spacing: 0.04em;
  text-align: center;
  padding: 2px 0;
  font-size: 0.66rem;
}
.home-heatmap__hdr--vp {
  grid-column: span 3;
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px; margin-bottom: 2px;
}
.home-heatmap__row-lbl {
  color: var(--fg-1);
  font-weight: 600;
  padding: 0 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  align-self: center;
  text-decoration: none;
}
.home-heatmap__row-lbl:hover { color: var(--accent-2); text-decoration: underline; }
.home-heatmap__row-id {
  display: flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap; overflow: hidden;
}
.home-heatmap__row-rank {
  font-size: 0.62rem;
  color: var(--fg-2);
  font-weight: 400;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
.home-heatmap__row-cat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  color: var(--fg-2);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.home-heatmap__cat-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  flex: 0 0 7px;
}
.home-heatmap__el-bar {
  display: block;
  height: 4px;
  background: var(--bg-2);
  border-radius: 2px;
  margin-top: 3px;
  overflow: hidden;
}
.home-heatmap__el-bar > span {
  display: block;
  height: 100%;
  background: var(--accent-2);
}
.home-heatmap__cell {
  display: grid; place-items: center;
  height: 30px;
  border-radius: 3px;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  transition: transform 80ms ease, filter 80ms ease;
}
.home-heatmap__cell:hover { transform: scale(1.08); filter: brightness(1.12); text-decoration: none; }
.home-heatmap__cell--good { background: #2a7a3f; }
.home-heatmap__cell--mid  { background: #b88a14; }
.home-heatmap__cell--bad  { background: #b73a3a; }
.home-heatmap__cell--missing { background: var(--bg-2); color: var(--fg-2); cursor: default; }
.home-heatmap__cell--vp-divider { margin-left: 8px; }
.home-heatmap__cell--best  { box-shadow: inset 0 0 0 2px rgba(255,255,255,0.95); }
.home-heatmap__cell--worst { box-shadow: inset 0 0 0 2px rgba(0,0,0,0.55); }

@media (max-width: 720px) {
  .home-heatmap__grid {
    grid-template-columns: 80px repeat(6, 1fr) 36px;
    font-size: 0.62rem;
  }
  .home-heatmap__cell { height: 26px; }
  .home-heatmap__row-lbl { font-size: 0.7rem; padding: 0 4px; }
  .home-heatmap__row-cat { font-size: 0.55rem; }
  .home-heatmap__row-rank { font-size: 0.55rem; }
}

/* Stats row --------------------------------------------------------------- */
.home-stats {
  display: flex; flex-wrap: wrap; gap: 14px;
  padding: 14px 16px; margin: 28px 0 0;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px;
}
.home-stats__chip {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 130px;
}
.home-stats__chip .lbl {
  font-size: 0.72rem; color: var(--fg-2);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.home-stats__chip .val {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 1.4rem; font-weight: 600; color: var(--fg-0);
}

/* Card grid --------------------------------------------------------------- */
.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 36px 0 12px;
}
.home-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 18px 20px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--fg-0);
  transition: border-color 80ms ease, transform 80ms ease, box-shadow 80ms ease;
}
.home-card:hover {
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.home-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
.home-card p { color: var(--fg-1); font-size: 0.92rem; margin: 0; }
.home-card__cta {
  margin-top: auto; padding-top: 10px;
  color: var(--accent-2);
  font-weight: 500;
  font-size: 0.92rem;
}

/* Explainer --------------------------------------------------------------- */
.home-explainer {
  margin-top: 36px;
  padding: 22px 26px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.home-explainer h2 {
  font-size: 1.2rem;
  font-weight: 600;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  margin-bottom: 12px;
}
.home-explainer ol {
  list-style: decimal inside;
  display: grid;
  gap: 10px;
}
.home-explainer li { color: var(--fg-1); }
.home-explainer code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.88em;
  background: var(--bg-2);
  padding: 0 4px;
  border-radius: 3px;
}
.home-explainer strong { color: var(--accent); }

@media (max-width: 720px) {
  .home-hero h1 { letter-spacing: -0.015em; }
  .home-demo__hint { font-size: 0.7rem; }
}
