@import url('/build-better-games/landing.css?v=14');

.campaign-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding-block: 88px 96px
}

.campaign-hero h1 {
  font-size: clamp(48px, 5.1vw, 76px);
  line-height: 1.04;
  letter-spacing: -3px;
  text-wrap: balance
}

.campaign-hero .intro {
  max-width: 600px;
  font-size: 18px
}

.campaign-hero .actions {
  flex-wrap: wrap;
  gap: 16px
}

.campaign-demo {
  position: relative;
  min-width: 0;
  padding: 24px;
  background: linear-gradient(150deg, #1d1e26, #111218);
  border: 1px solid #595047;
  border-radius: 18px;
  box-shadow: 0 30px 90px #0006
}

.demo-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font: 11px/1.5 ui-monospace, monospace;
  letter-spacing: 1px;
  color: var(--muted)
}

.demo-top span:last-child {
  color: var(--accent);
  padding: 5px 8px;
  border: 1px solid #65513b;
  border-radius: 20px
}

.game-map {
  height: 225px;
  margin: 24px 0;
  position: relative;
  border: 1px solid #3c3d47;
  border-radius: 10px;
  background: radial-gradient(ellipse at 50% 100%, #55402c44, transparent 70%), repeating-linear-gradient(0deg, transparent 0 29px, #ffffff07 30px), repeating-linear-gradient(90deg, transparent 0 29px, #ffffff07 30px);
  overflow: hidden
}

.platform {
  position: absolute;
  height: 12px;
  border-top: 3px solid #ffb454;
  background: #3f342a;
  border-radius: 3px;
  bottom: 32px
}

.p1 {
  left: 5%;
  width: 30%
}

.p2 {
  left: 42%;
  width: 20%;
  bottom: 70px
}

.p3 {
  left: 70%;
  width: 25%;
  bottom: 110px
}

.pixel-player {
  position: absolute;
  width: 22px;
  height: 28px;
  left: 12%;
  bottom: 44px;
  background: #ffb454;
  border-radius: 6px 6px 3px 3px;
  box-shadow: 0 5px 25px #ffb45466;
  animation: play-route 7s ease-in-out infinite
}

.pixel-player:before {
  content: '';
  position: absolute;
  inset: 7px 4px auto;
  height: 5px;
  background: linear-gradient(90deg, #18181c 30%, transparent 30% 70%, #18181c 70%)
}

.pixel-player:after {
  content: '';
  position: absolute;
  width: 8px;
  height: 5px;
  background: #ffb454;
  bottom: -5px;
  box-shadow: 14px 0 #ffb454
}

.map-label {
  position: absolute;
  color: var(--muted);
  font: 10px ui-monospace, monospace;
  left: 16px;
  top: 15px
}

.checkpoint {
  position: absolute;
  right: 13%;
  bottom: 124px;
  color: var(--accent);
  font-size: 36px;
  line-height: 1
}

.event-stream {
  display: grid;
  gap: 9px
}

.event-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 13px;
  border: 1px solid #3a3c45;
  border-radius: 7px;
  background: #15161c;
  font: 11px/1.5 ui-monospace, monospace
}

.event-line span:last-child {
  color: var(--accent)
}

.event-line:nth-child(2) {
  animation: event-glow 7s 1s infinite
}

.event-line:nth-child(3) {
  animation: event-glow 7s 3s infinite
}

.demo-note {
  margin: 18px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7
}

.motion-control {
  display: block;
  margin: 16px 0 0 auto;
  min-height: 44px;
  padding: 8px 14px;
  color: var(--text);
  background: transparent;
  border: 1px solid #656773;
  border-radius: 5px;
  cursor: pointer
}

.paused *,
.paused *:before,
.paused *:after {
  animation-play-state: paused !important
}

.campaign-strip {
  border-block: 1px solid var(--line);
  background: var(--bg-alt)
}

.campaign-strip .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  padding-block: 24px;
  font: 12px/1.7 ui-monospace, monospace;
  color: var(--muted)
}

.campaign-strip b {
  color: var(--text);
  font-weight: 500
}

.campaign-section {
  padding-block: 104px
}

.campaign-section.alt {
  background: var(--bg-alt);
  border-block: 1px solid #252630
}

.campaign-heading {
  max-width: 850px;
  margin-bottom: 44px
}

.campaign-heading p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
  max-width: 720px
}

.campaign-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px
}

.campaign-card {
  padding: 30px;
  background: #15161c;
  border: 1px solid #575044;
  border-radius: 12px
}

.campaign-card .eyebrow {
  margin-bottom: 22px
}

.campaign-card h3 {
  font-size: 24px;
  line-height: 1.25;
  margin: 0 0 15px
}

.campaign-card p {
  color: var(--muted);
  line-height: 1.8;
  margin: 0
}

.campaign-proof {
  display: grid;
  grid-template-columns: .78fr 1.22fr;
  gap: 55px;
  align-items: center
}

.campaign-proof p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 17px
}

.campaign-proof ul {
  padding-left: 20px;
  color: var(--muted);
  line-height: 2
}

.product-frame {
  margin: 0;
  min-width: 0
}

.product-frame img {
  width: 100%;
  display: block;
  border: 1px solid #4d4f5a;
  border-radius: 12px;
  box-shadow: 0 25px 70px #0005
}

.product-frame figcaption {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 15px
}

.setup-path {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
  counter-reset: step
}

.setup-step {
  padding-top: 24px;
  border-top: 1px solid #66606a
}

.setup-step h3 {
  font-size: 23px;
  line-height: 1.3;
  margin: 18px 0 13px
}

.setup-step p {
  color: var(--muted);
  line-height: 1.8
}

.step-number {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: #302619;
  color: var(--accent);
  border: 1px solid #8c652f;
  border-radius: 50%;
  font: 13px ui-monospace, monospace
}

.campaign-faq {
  max-width: none
}

.campaign-faq details {
  border: 1px solid #464850;
  border-radius: 8px;
  background: #15161c;
  margin-bottom: 12px;
  padding: 0 24px
}

.campaign-faq summary {
  padding: 22px 0;
  min-height: 65px;
  cursor: pointer;
  font-size: 17px;
  line-height: 1.5
}

.campaign-faq details p {
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
  padding: 0 0 24px;
  max-width: 1000px
}

.campaign-faq a {
  text-underline-offset: 4px;
  color: var(--accent)
}

.campaign-end {
  position: relative;
  overflow: hidden;
  padding-block: 110px;
  text-align: center;
  background: radial-gradient(ellipse at center, #4b342144, transparent 65%), repeating-radial-gradient(ellipse at center, transparent 0 60px, #ffb4540d 61px 62px, transparent 63px 120px), #101116;
  border-top: 1px solid #39342d
}

.campaign-end h2 {
  max-width: 900px;
  margin-inline: auto
}

.campaign-end p {
  color: var(--muted);
  line-height: 1.8
}

.campaign-end .button {
  margin-top: 20px
}

.campaign-end .fine {
  font-size: 13px
}

.retention-chart {
  height: 225px;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding: 35px 20px 32px;
  margin: 24px 0;
  border: 1px solid #3c3d47;
  border-radius: 10px;
  background: repeating-linear-gradient(0deg, transparent 0 39px, #ffffff08 40px)
}

.cohort {
  flex: 1;
  background: linear-gradient(#ffb454, #7b5428);
  border: 1px solid #ffb454;
  border-radius: 5px 5px 0 0;
  position: relative;
  transform-origin: bottom;
  animation: bar-breathe 7s ease-in-out infinite
}

.cohort:nth-child(2) {
  animation-delay: .3s
}

.cohort:nth-child(3) {
  animation-delay: .6s
}

.cohort span {
  position: absolute;
  bottom: -23px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font: 10px ui-monospace, monospace;
  color: var(--muted)
}

.persona-labels {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px
}

.persona-labels span {
  border: 1px solid #5d5144;
  border-radius: 20px;
  padding: 7px 10px;
  color: var(--text);
  font-size: 11px
}

.persona-labels span:nth-child(2) {
  background: #3a2d1e;
  color: #ffca83
}

.campaign-hero.playtest .pixel-player {
  background: #c8b2ff;
  box-shadow: 0 5px 25px #c8b2ff44
}

.campaign-hero.playtest .pixel-player:after {
  background: #c8b2ff;
  box-shadow: 14px 0 #c8b2ff
}

.campaign-hero.playtest .game-map {
  height: 185px;
  margin-block: 18px
}

.campaign-hero.playtest .campaign-demo {
  background: linear-gradient(150deg, #24202c, #111218)
}

@keyframes play-route {

  0%,
  15% {
    left: 12%;
    bottom: 44px
  }

  28% {
    left: 38%;
    bottom: 130px
  }

  40%,
  50% {
    left: 49%;
    bottom: 82px
  }

  65% {
    left: 68%;
    bottom: 170px
  }

  80%,
  100% {
    left: 81%;
    bottom: 122px
  }
}

@keyframes event-glow {

  0%,
  20%,
  100% {
    border-color: #3a3c45
  }

  30%,
  60% {
    border-color: #ffb454;
    background: #292217
  }
}

@keyframes bar-breathe {

  0%,
  100% {
    transform: scaleY(.9)
  }

  50% {
    transform: scaleY(1)
  }
}

@media(min-width:1600px) {
  .campaign-hero {
    gap: 95px
  }

  .campaign-demo {
    padding: 34px
  }

  .game-map,
  .retention-chart {
    height: 260px
  }
}

@media(max-width:950px) {
  .campaign-hero {
    gap: 36px
  }

  .campaign-hero h1 {
    font-size: 52px;
    letter-spacing: -2px
  }

  .campaign-proof {
    grid-template-columns: 1fr;
    gap: 35px
  }

  .campaign-cards {
    gap: 14px
  }

  .campaign-card {
    padding: 22px
  }

  .campaign-card h3 {
    font-size: 21px
  }

  .campaign-section {
    padding-block: 76px
  }
}

@media(max-width:700px) {
  .campaign-hero {
    grid-template-columns: 1fr;
    padding-block: 54px 60px;
    gap: 40px
  }

  .campaign-hero h1 {
    font-size: clamp(42px, 10vw, 62px);
    letter-spacing: -2px
  }

  .campaign-hero .intro {
    font-size: 17px
  }

  .campaign-cards,
  .setup-path {
    grid-template-columns: 1fr;
    gap: 18px
  }

  .campaign-card {
    padding: 26px
  }

  .campaign-section {
    padding-block: 62px
  }

  .campaign-demo {
    padding: 18px
  }

  .campaign-strip .wrap {
    gap: 12px
  }

  .campaign-heading {
    margin-bottom: 30px
  }

  .campaign-faq details {
    padding-inline: 18px
  }

  .campaign-end {
    padding-block: 75px
  }

  .event-line {
    font-size: 10px
  }

  .campaign-hero .actions {
    gap: 12px
  }

  .campaign-proof {
    gap: 24px
  }

  .campaign-heading h2 {
    font-size: 37px
  }

  .campaign-end h2 {
    font-size: 40px
  }

  .demo-top {
    font-size: 10px
  }
}

@media(prefers-reduced-motion:reduce) {
  .campaign-demo * {
    animation: none !important
  }
}

/* The base button display rule must never override the hidden attribute. */
.motion-control[hidden] {
  display: none !important
}

/* Full generated environment: no cover crop or hidden lower scenery. */
.illustrated-scene {
  --ground: 26.5%;
  position: relative;
  aspect-ratio: 1672/941;
  isolation: isolate;
  margin: 24px -10px 20px;
  border: 1px solid #615442;
  border-radius: 10px;
  overflow: hidden;
  background: #161c23
}

[data-game-demo=unity] .illustrated-scene {
  --ground: 29%
}

[data-game-demo=playtest] .illustrated-scene {
  --ground: 27%
}

.scene-background {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  position: absolute;
  inset: 0
}

.scene-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(#07090d99, transparent 38%, transparent 72%, #07090d99);
  pointer-events: none
}

.scene-chapter,
.scene-story {
  position: absolute;
  left: 14px;
  right: 14px;
  color: #fff2df;
  font: 10px/1.5 ui-monospace, monospace;
  letter-spacing: .6px;
  text-shadow: 0 1px 4px #000;
  background: #101116ed;
  width: fit-content;
  padding: 5px 8px;
  border-radius: 4px;
  max-width: calc(100% - 28px)
}

.scene-chapter {
  top: 12px
}

.scene-story {
  bottom: 10px
}

.scene-sprite {
  position: absolute;
  width: 19%;
  aspect-ratio: 1;
  left: 12%;
  bottom: calc(var(--ground) - 1.7%);
  background-size: 400% 300%;
  background-repeat: no-repeat;
  transform: translateX(-50%);
  will-change: left, transform;
  background-position: 0 0;
  filter: drop-shadow(0 4px 3px #0006)
}

.scene-checkpoint {
  position: absolute;
  left: 49%;
  bottom: var(--ground);
  height: 19%;
  width: 3px;
  background: #d6b881;
  border-radius: 3px;
  filter: drop-shadow(0 0 7px #ffb45466)
}

.scene-checkpoint span {
  display: block;
  width: 20px;
  height: 14px;
  background: #ffb454;
  clip-path: polygon(0 0, 100% 10%, 80% 50%, 100% 90%, 0 100%)
}

.scene-spark {
  position: absolute;
  left: 49%;
  bottom: calc(var(--ground) + 4%);
  width: 20px;
  height: 20px;
  border: 2px solid #ffce86;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 0 16px #ffb454
}

[data-game-demo=unity] .scene-checkpoint {
  display: none
}

[data-game-demo=playtest] .scene-checkpoint {
  left: 30%;
  background: #dbc5ff
}

[data-game-demo=playtest] .scene-checkpoint span {
  background: #ccb1ff
}

[data-game-demo=playtest] .scene-spark {
  left: 30%
}

[data-game-demo=unity] .scene-spark {
  left: 87%
}

.event-stream .event-line {
  animation: none
}

.event-line.is-current {
  border-color: #ffb454;
  background: #292217
}

.event-line.is-done {
  border-color: #746047
}

.persona-labels span,
.persona-labels span:nth-child(2) {
  background: transparent;
  color: var(--text)
}

.persona-labels span.is-persona {
  background: #493455;
  color: #f0ddff;
  border-color: #a586b9
}

@media(max-width:700px) {
  .illustrated-scene {
    margin-inline: -4px
  }

  .scene-chapter,
  .scene-story {
    font-size: 8px;
    padding: 4px 6px;
    left: 10px;
    max-width: calc(100% - 20px)
  }

  .scene-story {
    bottom: 6px
  }

  .scene-chapter {
    top: 8px
  }

  .scene-checkpoint span {
    width: 15px;
    height: 10px
  }
}

/* The forest scout belongs only to the Godot platformer. */
[data-game-demo=godot] .scene-sprite {
  background-image: url('/art/campaign-godot-fox-atlas.webp');
  background-size: 400% 200%;
  bottom: var(--ground);
  width: 19%;
}

[data-game-demo=godot] .scene-checkpoint,
[data-game-demo=godot] .scene-spark {
  left: 38%;
}

.forest-obstacle {
  position: absolute;
  left: 51%;
  width: 12%;
  aspect-ratio: 1774 / 887;
  bottom: var(--ground);
  background: url('/art/campaign-godot-moss-stone.webp') center / contain no-repeat;
  /* The generated prop's visible base is at759 of887pixels. */
  transform: translateY(14.43%);
  pointer-events: none;
}
