:root {
  color-scheme: light;
  --bg: #f7fbff;
  --bg-strong: #eef7f4;
  --ink: #142033;
  --muted: #65738a;
  --line: #d8e2ea;
  --panel: #ffffff;
  --panel-blue: #f0f7ff;
  --panel-green: #effaf4;
  --panel-gold: #fff6df;
  --panel-rose: #fff2f1;
  --teal: #0f766e;
  --blue: #3366a3;
  --gold: #b7791f;
  --coral: #d45a38;
  --shadow: 0 20px 60px rgba(26, 45, 74, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(rgba(51, 102, 163, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 118, 110, 0.05) 1px, transparent 1px),
    var(--bg);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.58;
}

img {
  display: block;
  max-width: 100%;
}

figure {
  margin: 0;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(20, 32, 51, 0.1);
  background: rgba(247, 251, 255, 0.9);
  backdrop-filter: blur(18px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.04rem;
  font-weight: 850;
  text-decoration: none;
}

.brand img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 680;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
}

.nav-cta {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(20, 32, 51, 0.16);
  border-radius: 6px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(26, 45, 74, 0.08);
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  overflow: hidden;
  min-height: min(720px, calc(100svh - 68px));
  padding: 84px 0 72px;
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(247, 251, 255, 0.88), rgba(247, 251, 255, 0.98)),
    url("screenshots/map-the-ville.png") center / cover no-repeat;
}

.hero::after {
  position: absolute;
  right: -20%;
  bottom: 0;
  left: -20%;
  height: 190px;
  content: "";
  background: linear-gradient(0deg, rgba(239, 250, 244, 0.92), rgba(239, 250, 244, 0));
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: block;
  align-items: center;
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-copy {
  max-width: 1240px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge,
.mini-label {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.04;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(4.8rem, 16vw, 11rem);
  font-weight: 900;
}

h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3.2vw, 3.25rem);
  font-weight: 880;
}

h3 {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 820;
}

.hero-subtitle {
  margin: 8px auto 0;
  max-width: none;
  color: #24324a;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  font-weight: 790;
  line-height: 1.12;
}

@media (min-width: 1100px) {
  .hero-subtitle {
    white-space: nowrap;
  }
}

.hero-line {
  margin: 18px auto 0;
  max-width: 58ch;
  color: #46566e;
  font-size: 1.18rem;
  font-weight: 760;
}

.button-row,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  justify-content: center;
  margin-top: 30px;
}

.hero-contact {
  margin: 22px 0 0;
  color: #52627a;
  font-size: 0.95rem;
  font-weight: 720;
}

.hero-contact a {
  color: var(--ink);
  text-decoration-color: rgba(20, 32, 51, 0.32);
  text-underline-offset: 4px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-weight: 780;
  text-decoration: none;
}

.button:hover {
  transform: translateY(-1px);
}

.button--ghost {
  border-color: rgba(20, 32, 51, 0.18);
  background: #fff;
  color: var(--ink);
}

.button--small {
  min-height: 38px;
  padding: 0 13px;
  font-size: 0.9rem;
}

.world-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(20, 32, 51, 0.12);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.world-panel::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0) 68%, rgba(255, 255, 255, 0.86)),
    linear-gradient(90deg, rgba(15, 118, 110, 0.18), rgba(212, 90, 56, 0.08));
  pointer-events: none;
}

.world-panel img {
  width: 100%;
  height: 430px;
  object-fit: contain;
  background: #f3fbff;
}

.world-panel__hud {
  position: absolute;
  z-index: 3;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.hud-cell {
  min-width: 0;
  border: 1px solid rgba(20, 32, 51, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.88);
  padding: 10px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 740;
}

.hud-cell strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scroll-cue {
  position: absolute;
  z-index: 3;
  bottom: 16px;
  left: 50%;
  color: rgba(20, 32, 51, 0.56);
  font-size: 0.74rem;
  font-weight: 820;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 74px 0;
}

.section--tight {
  padding-top: 34px;
}

.band {
  width: 100%;
  max-width: none;
  border-block: 1px solid rgba(20, 32, 51, 0.08);
  background: rgba(239, 250, 244, 0.82);
}

.band > .section-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 74px 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(260px, 0.5fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}

.section-heading p:not(.mini-label) {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.product-grid,
.feature-grid,
.library-grid {
  display: grid;
  gap: 16px;
}

.product-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-grid,
.library-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-card,
.feature-card,
.library-card,
.callout {
  border: 1px solid rgba(20, 32, 51, 0.12);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 14px 40px rgba(26, 45, 74, 0.08);
}

.product-card {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  text-decoration: none;
}

.product-card:hover,
.feature-card:hover,
.library-card:hover {
  border-color: rgba(15, 118, 110, 0.34);
  transform: translateY(-2px);
}

.product-card--replay {
  background: var(--panel-blue);
}

.product-card--map {
  background: var(--panel-green);
}

.product-card--agent {
  background: var(--panel-gold);
}

.product-card--experiment {
  background: var(--panel-rose);
}

.product-card__icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(20, 32, 51, 0.13);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 1.22rem;
  font-weight: 850;
}

.product-card__label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.product-card strong {
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.14;
}

.product-card span:last-child {
  color: #4c5b70;
  font-size: 0.97rem;
}

.feature-card,
.library-card {
  overflow: hidden;
}

.feature-card__media,
.library-card__media {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--panel-green);
}

.feature-card__media img,
.library-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.library-card__media--agent {
  background:
    linear-gradient(rgba(20, 32, 51, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 32, 51, 0.06) 1px, transparent 1px),
    #fffaf0;
  background-size: 18px 18px;
}

.library-card__media--agent img {
  padding: 24px;
  object-fit: contain;
  image-rendering: pixelated;
}

.feature-card__body,
.library-card__body {
  padding: 20px;
}

.feature-card__body p,
.library-card__body p {
  color: var(--muted);
}

.feature-card__meta,
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.feature-card__meta span,
.stat-row span {
  border: 1px solid rgba(20, 32, 51, 0.1);
  border-radius: 999px;
  background: #fff;
  padding: 5px 9px;
  color: #52627a;
  font-size: 0.76rem;
  font-weight: 760;
}

.library-card__glyph {
  display: grid;
  min-height: 172px;
  place-items: center;
  background:
    linear-gradient(rgba(20, 32, 51, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 32, 51, 0.06) 1px, transparent 1px),
    var(--panel-gold);
  background-size: 18px 18px;
  color: var(--teal);
  font-size: 4rem;
  font-weight: 900;
}

.callout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 24px;
  background: #fff;
}

.callout p {
  max-width: 68ch;
  margin: 10px 0 0;
  color: var(--muted);
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 34px;
}

.page-hero p {
  max-width: 68ch;
  color: var(--muted);
  font-size: 1.08rem;
}

.page-hero h1 {
  max-width: 980px;
  font-size: clamp(3.2rem, 9vw, 6.5rem);
}

.pack-detail {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 72px;
}

.pack-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: 18px;
  align-items: start;
}

.map-preview,
.pack-side,
.agent-preview-card,
.detail-mini-card {
  border: 1px solid rgba(20, 32, 51, 0.12);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 14px 40px rgba(26, 45, 74, 0.08);
}

.map-preview {
  overflow: hidden;
}

.map-preview img {
  width: 100%;
  min-height: 320px;
  max-height: 660px;
  object-fit: contain;
  background: #edf7f1;
}

.pack-side {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.pack-side p {
  margin: 0;
  color: var(--muted);
}

.detail-list,
.agent-preview-grid {
  display: grid;
  gap: 10px;
}

.detail-list {
  max-height: 460px;
  overflow: auto;
}

.detail-mini-card {
  padding: 12px;
}

.detail-mini-card strong,
.agent-preview-card strong {
  display: block;
  color: var(--ink);
  line-height: 1.2;
}

.detail-mini-card span,
.detail-mini-card small,
.agent-preview-card p {
  display: block;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.agent-preview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.agent-preview-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.agent-preview-card img,
.agent-preview-placeholder {
  width: 100%;
  height: 150px;
  border: 1px solid rgba(20, 32, 51, 0.08);
  border-radius: 6px;
  background:
    linear-gradient(rgba(20, 32, 51, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 32, 51, 0.06) 1px, transparent 1px),
    #fffaf0;
  background-size: 18px 18px;
}

.agent-preview-card img {
  padding: 14px;
  object-fit: contain;
  image-rendering: pixelated;
}

.agent-preview-placeholder {
  display: grid;
  place-items: center;
  color: var(--teal);
  font-size: 2rem;
  font-weight: 900;
}

.footer {
  border-top: 1px solid rgba(20, 32, 51, 0.1);
  background: rgba(255, 255, 255, 0.72);
  padding: 34px 0;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  justify-content: space-between;
  gap: 20px;
}

.replay-page {
  min-height: 100vh;
  background: #f6fbff;
}

.replay-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 18px;
}

.replay-hero h1 {
  font-size: clamp(2.8rem, 8vw, 6rem);
}

.replay-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 48px;
}

.replay-stage,
.replay-panel {
  border: 1px solid rgba(20, 32, 51, 0.12);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 16px 45px rgba(26, 45, 74, 0.08);
}

.replay-stage {
  overflow: hidden;
}

.map-toolbar,
.timeline-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(20, 32, 51, 0.09);
  padding: 12px;
}

.map-toolbar strong,
.timeline-controls strong {
  line-height: 1.2;
}

.map-wrap {
  position: relative;
  overflow: auto;
  height: min(68vh, 720px);
  min-height: 440px;
  background:
    linear-gradient(rgba(20, 32, 51, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 32, 51, 0.05) 1px, transparent 1px),
    #eaf3ee;
  background-size: 24px 24px;
}

.map-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
  min-width: 760px;
}

.timeline-controls {
  border-top: 1px solid rgba(20, 32, 51, 0.09);
  border-bottom: 0;
}

.timeline-controls input[type="range"] {
  flex: 1;
  min-width: 140px;
}

.replay-panel {
  display: grid;
  max-height: calc(100vh - 150px);
  grid-template-rows: auto auto 1fr;
  overflow: hidden;
}

.panel-section {
  border-bottom: 1px solid rgba(20, 32, 51, 0.09);
  padding: 14px;
}

.panel-section:last-child {
  overflow: auto;
  border-bottom: 0;
}

.panel-section h2 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.agent-list,
.command-list,
.download-list {
  display: grid;
  gap: 8px;
}

.agent-row,
.command-row,
.download-row {
  border: 1px solid rgba(20, 32, 51, 0.1);
  border-radius: 6px;
  background: #fbfdff;
  padding: 10px;
}

.agent-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 9px;
}

.agent-dot {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 50%;
}

.agent-row strong,
.command-row strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-row span,
.command-row span,
.download-row span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.download-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
}

.status-pill {
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  background: #effaf4;
  padding: 4px 8px;
  color: var(--teal);
  font-size: 0.74rem;
  font-weight: 820;
}

@media (max-width: 980px) {
  .hero {
    padding-bottom: 42px;
  }

  .hero-inner,
  .section-heading,
  .callout,
  .pack-stage,
  .replay-shell {
    grid-template-columns: 1fr;
  }

  .product-grid,
  .feature-grid,
  .library-grid,
  .agent-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .replay-panel {
    max-height: none;
  }
}

@media (max-width: 680px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 13px 0;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 12px;
  }

  .hero {
    padding-top: 48px;
    min-height: 650px;
    padding-bottom: 46px;
  }

  .hero-inner {
    gap: 28px;
  }

  h1 {
    font-size: clamp(3.8rem, 24vw, 5.5rem);
  }

  .hero-subtitle {
    font-size: 1.55rem;
  }

  .world-panel img {
    height: 120px;
  }

  .world-panel__hud {
    display: none;
  }

  .product-grid,
  .feature-grid,
  .library-grid,
  .agent-preview-grid {
    grid-template-columns: 1fr;
  }

  .product-card {
    min-height: 0;
  }

  .footer-inner,
  .timeline-controls,
  .map-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-wrap {
    min-height: 360px;
  }

  .scroll-cue {
    display: none;
  }

  .section--tight {
    padding-top: 18px;
  }
}
