@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450&family=Pixelify+Sans:wght@500;600&display=swap');

:root {
  color-scheme: light;
  font-family: 'DM Sans', Arial, sans-serif;
  color: #18241e;
  background: #f4f7f3;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; }
::selection { color: #18241e; background: #d1e4c8; }

.canvas {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 100px 24px;
  isolation: isolate;
  overflow: hidden;
}

.world-scene { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: #f4f7f3; }
.world-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; opacity: 0; }
.world-scene.is-ready .world-backdrop { opacity: 1; }
.world-shade { position: absolute; inset: 0; background: #13271f04; }
.world-veil { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.world-debris { position: absolute; inset: 0; overflow: hidden; }
.world-fragment { position: absolute; top: 0; left: 0; will-change: transform, opacity; }

.world-peeking .wordmark, .world-revealed .wordmark { color: #f5efdb; text-shadow: 2px 2px 0 #091b12; }
.world-peeking .wordmark-ai, .world-revealed .wordmark-ai { color: #b7dba0; }
.world-revealed .wordmark-trigger:focus-visible { outline-color: #d6ffb9; }
.world-revealed .navigation li { color: #fff5e2; }
.navigation::before { content: ''; position: absolute; inset: -10px -15px; z-index: -1; background: #f4f7f3ed; box-shadow: 2px 2px 0 #16351c30; opacity: 0; }
.world-peeking .navigation::before { opacity: 1; }
.world-revealed .navigation::before { background: #13271ff5; box-shadow: 2px 2px 0 #091b12; }

.wordmark {
  margin: 0;
  position: relative;
  z-index: 2;
  font-family: 'Pixelify Sans', monospace;
  font-size: min(clamp(4.25rem, 13vw, 12rem), 24vw);
  font-weight: 500;
  font-style: normal;
  line-height: 1;
  letter-spacing: -.065em;
  text-shadow: 3px 3px 0 #d6e5d0;
  white-space: nowrap;
  animation: arrive 1s cubic-bezier(.2, .7, .2, 1) both;
}

.wordmark::before, .wordmark::after {
  content: '';
  position: absolute;
  pointer-events: none;
  opacity: 0;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, calc(100% - 8px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 8px) calc(100% - 4px), calc(100% - 8px) 100%, 8px 100%, 8px calc(100% - 4px), 0 calc(100% - 4px), 0 4px, 8px 4px);
}
.wordmark::before { inset: .20em -.10em .025em; z-index: -1; background: #13271f; }
.wordmark::after { inset: calc(.20em - 2px) calc(-.10em - 2px) calc(.025em - 2px); z-index: -2; background: #93b49a; }
.world-peeking .wordmark::before, .world-peeking .wordmark::after { opacity: 1; }

.wordmark-ai {
  font-weight: 500;
  font-style: normal;
  letter-spacing: -.065em;
  margin-left: .025em;
  color: #4b8060;
}

.brand-mascot {
  --mascot-size: clamp(64px, 6.4vw, 96px);
  --mascot-shift-x: calc(var(--mascot-size) / 32);
  --mascot-shift-y: calc(var(--mascot-size) / 24);
  position: absolute;
  right: calc(.33em - var(--mascot-size) / 2);
  bottom: calc(100% - .4em);
  width: var(--mascot-size);
  height: var(--mascot-size);
  transform-origin: center bottom;
}

.brand-mascot-sprite {
  display: block;
  width: 100%;
  height: 100%;
  background: url('/assets/bring-bot-sprites.png') 0 0 / 200% 200% no-repeat;
  image-rendering: pixelated;
}

.brand-mascot-sprite.is-rigged { position: relative; background-image: none; }
.mascot-idle-frame, .mascot-movement-frame { position: absolute; inset: 0; display: block; background-size: 200% 200%; background-repeat: no-repeat; image-rendering: pixelated; }
.mascot-idle-frame { background-image: url('/assets/bring-bot-sprites.png'); }
.mascot-movement-frame { background-image: url('/assets/bring-bot-motion.png'); opacity: 0; visibility: hidden; }

.motion-paused .brand-mascot,
.motion-paused .brand-mascot-sprite { animation-play-state: paused; }

.brand-mascot.is-away { visibility: hidden; animation-play-state: paused; }
.brand-mascot.is-away .brand-mascot-sprite { animation-play-state: paused; }

.wordmark-trigger {
  display: block;
  border: 0;
  margin: 0;
  padding: .14em .12em .16em .08em;
  background: transparent;
  color: inherit;
  text-shadow: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  cursor: crosshair;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.wordmark-trigger:focus-visible {
  outline: 1px solid #7e9380;
  outline-offset: 12px;
  border-radius: 4px;
}

.play-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
}

.play-token {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-family: Georgia, serif;
  font-size: 24px;
  line-height: 1;
  contain: layout style paint;
  will-change: transform, opacity;
  user-select: none;
}

.play-token.is-emoji {
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  font-size: 30px;
}

.play-token.is-visitor {
  display: block;
  width: 184px;
  height: 156px;
  contain: layout style;
  transform-origin: 92px 108px;
}

.robot-sprite {
  --mascot-shift-x: 3px;
  --mascot-shift-y: 4px;
  position: absolute;
  bottom: 0;
  left: 44px;
  width: 96px;
  height: 96px;
  background: url('/assets/bring-bot-sprites.png') 0 0 / 192px 192px no-repeat;
  image-rendering: pixelated;
}

.is-resting .robot-sprite {
  animation: mascot-idle 7s steps(1, end) infinite, mascot-bob 4.8s ease-in-out infinite;
}

.is-flying .robot-sprite { background-position: 0 -92px; }

.robot-thrust {
  position: absolute;
  top: 143px;
  left: 84px;
  width: 16px;
  height: 22px;
  visibility: hidden;
  background: linear-gradient(#b9e4be 0 35%, #e7efbd 35% 70%, transparent 70%);
  clip-path: polygon(0 0, 100% 0, 100% 40%, 75% 40%, 75% 70%, 50% 100%, 25% 70%, 25% 40%, 0 40%);
  transform-origin: center top;
}

.is-flying .robot-thrust {
  visibility: visible;
  animation: jet-pulse .18s steps(2, end) infinite;
}

.is-flight-spark { font-size: 15px; }

.robot-bubble {
  position: absolute;
  visibility: hidden;
  bottom: 111px;
  left: 92px;
  width: max-content;
  max-width: 180px;
  padding: 8px 12px;
  border: 1px solid #748b74;
  background: #fbfff5;
  box-shadow: 3px 3px 0 #c8d9bd;
  color: #2c4b35;
  font-family: 'Pixelify Sans', monospace;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  transform: translateX(-50%);
}

.robot-bubble::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: var(--tail-x, 50%);
  width: 7px;
  height: 7px;
  border-right: 1px solid #748b74;
  border-bottom: 1px solid #748b74;
  background: #fbfff5;
  transform: rotate(45deg);
}

.robot-bubble.is-below { top: 153px; bottom: auto; }
.robot-bubble.is-below::after { top: -5px; bottom: auto; transform: rotate(225deg); }
.robot-speech { display: block; }

.home-bubble {
  bottom: calc(100% + 4px);
  left: 50%;
  font-size: 13px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0;
  text-shadow: none;
}

.play-token.is-ripple {
  width: 52px;
  height: 52px;
  border: 1px solid #9bb1a0;
  border-radius: 50%;
}

.play-token.is-ripple::after {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px solid #bbcbbd;
  border-radius: inherit;
}

.navigation {
  position: absolute;
  z-index: 4;
  isolation: isolate;
  top: clamp(28px, 4.3vw, 62px);
  right: clamp(24px, 5vw, 80px);
}

.navigation ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(24px, 3.2vw, 48px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.navigation li {
  font-size: 1rem;
  font-weight: 450;
  line-height: 1.5;
  letter-spacing: -.015em;
  color: #38473e;
}
.navigation a { color: inherit; text-decoration: none; text-underline-offset: 6px; }
.navigation a:hover, .navigation a:focus-visible { text-decoration: underline; }

@keyframes arrive {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes mascot-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes mascot-idle {
  0%, 43%, 47%, 75%, 87%, 100% { background-position: 0 0; }
  44%, 46% { background-position: calc(100% + var(--mascot-shift-x)) calc(100% + var(--mascot-shift-y)); }
  76%, 80%, 84%, 86% { background-position: 0 calc(100% + var(--mascot-shift-y)); }
  81%, 83% { background-position: calc(100% + var(--mascot-shift-x)) 0; }
}

@keyframes jet-pulse {
  from { opacity: .65; transform: scaleY(.65); }
  to { opacity: .95; transform: scaleY(1.05); }
}

@media (max-width: 600px) {
  .navigation { top: 30px; right: 24px; left: 24px; }
  .navigation ul { gap: 20px; }
  .navigation li { font-size: .875rem; }
}

@media (prefers-reduced-motion: reduce) {
  .wordmark { animation: none; }
  .brand-mascot, .brand-mascot-sprite { animation: none; }
  .robot-sprite, .robot-thrust { animation: none !important; }
  .wordmark-trigger { cursor: default; }
  .play-layer { display: none; }
}
