/* Colours and fonts are the editor's (assets/themes/default/theme.json on dev).
   One motion idea runs through the page: things come out from behind an edge.
   Everything under .motion is skipped for prefers-reduced-motion. */

@font-face { font-family: Manrope; font-weight: 500; font-display: swap; src: url(assets/fonts/Manrope-Medium.ttf); }
@font-face { font-family: Manrope; font-weight: 600; font-display: swap; src: url(assets/fonts/Manrope-SemiBold.ttf); }
@font-face { font-family: Manrope; font-weight: 700; font-display: swap; src: url(assets/fonts/Manrope-Bold.ttf); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url(assets/fonts/JetBrainsMono-Regular.ttf); }

:root {
  color-scheme: dark;
  --black: #0a0a0b;
  --panel: #121213;
  --line: #ffffff1c;
  --white: #f4f4f6;
  --body: #cfcfd6;
  --dim: #a6a6ae;
  --indigo: #6c7fdb;
  --indigo-up: #7f90e4;
  --gutter: clamp(16px, 4vw, 64px);
  --out: cubic-bezier(.16, 1, .3, 1);
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; overflow-x: clip;
  background: var(--black); color: var(--body);
  font: 500 16px/26px Manrope, Ubuntu, "Noto Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--white); text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: #ffffff55; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }
p { margin: 0 0 16px; max-width: 38rem; }
figure { margin: 0; }
img { display: block; }
code, pre { font-family: var(--mono); font-weight: 400; }
code { font-size: .87em; }
.lead { font-size: 18px; line-height: 27px; color: var(--white); }
.note { font-size: 14px; line-height: 21px; color: var(--dim); }

/* Headlines sit in a clip box and slide up out of it. */
.line { display: block; overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em; }
.line > span { display: block; }

.nav {
  position: fixed; inset: 0 0 auto; z-index: 5;
  height: 60px; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid transparent;
  transition: transform .4s var(--out), background .25s, border-color .25s;
}
.nav.solid { background: var(--black); border-color: var(--line); }
.nav.away { transform: translateY(-100%); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; text-decoration: none; letter-spacing: -.01em; color: var(--white); }
.brand svg { fill: currentColor; }
.nav-links { display: flex; gap: clamp(14px, 2.4vw, 32px); font-size: 14px; }
.nav-links a { text-decoration: none; color: var(--body); transition: color .15s; }
.nav-links a:hover { color: var(--white); }

/* Hero. The mark is the picture. */
.hero { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: center; gap: clamp(24px, 4vw, 64px); max-width: 1240px; margin: 0 auto; padding: 112px var(--gutter) 72px; }

.hero-text { order: 1; min-width: 0; }
h1 { margin: 0 0 22px; color: var(--white); font-size: clamp(40px, 4.4vw, 60px); line-height: 1.08; font-weight: 600; letter-spacing: -.03em; }
.motion h1 .line > span { animation: up 1.1s var(--out) both; }
.motion h1 .line:nth-child(1) > span { animation-delay: .25s; }
.motion h1 .line:nth-child(2) > span { animation-delay: .34s; }
.motion h1 .line:nth-child(3) > span { animation-delay: .43s; }
@keyframes up { from { transform: translateY(112%); } }

.pitch { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: 34rem; }
.pitch p:last-child { margin-bottom: 0; }
.motion .pitch { animation: show .8s .85s both; }
@keyframes show { from { opacity: 0; } }
.get { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.primary, .secondary {
  height: 40px; padding: 0 16px; display: inline-flex; align-items: center;
  border-radius: 5px; font-size: 14px; font-weight: 700; text-decoration: none; letter-spacing: -.005em;
  transition: background .15s, color .15s, transform .35s var(--out);
}
.primary { background: var(--white); color: var(--black); }
.primary:hover { background: var(--indigo); color: var(--black); transform: translateY(-2px); }
.secondary { color: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.secondary:hover { box-shadow: inset 0 0 0 1px var(--white); transform: translateY(-2px); }

/* Indigo ticker. */
.band { background: var(--indigo); color: var(--black); overflow: hidden; }
.band-track { display: flex; align-items: center; width: max-content; padding: 8px 0; font-size: 15px; line-height: 20px; font-weight: 700; white-space: nowrap; }
.band-track span { padding: 0 16px; }
.band-track svg { width: 1.4em; height: 1em; flex: none; fill: currentColor; }
.motion .band-track { animation: slide 44s linear infinite; }
@keyframes slide { to { transform: translateX(-25%); } }

/* Screenshot grows to full width as it comes up. */
.showcase { max-width: 1240px; margin: 0 auto; padding: clamp(40px, 6vw, 72px) var(--gutter) 0; }
.showcase img { width: 100%; height: auto; border-radius: 5px; box-shadow: 0 0 0 1px var(--line); transform: scale(var(--grow, 1)); transform-origin: 50% 0; will-change: transform; }
figcaption { font-size: 14px; line-height: 20px; color: var(--dim); margin-top: 12px; }

.toy { position: relative; order: 2; justify-self: end; width: 100%; max-width: 480px; }
#logo3d { display: block; width: 140%; max-width: none; margin: -20%; aspect-ratio: 1; cursor: pointer; touch-action: pan-y; }
.hint { position: absolute; right: 4px; bottom: 4px; font: 12px/16px var(--mono); color: var(--dim); }

.block { max-width: 1240px; margin: 0 auto; padding: clamp(56px, 7vw, 96px) var(--gutter) 0; }
h2 { margin: 0 0 18px; color: var(--white); font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; font-weight: 600; letter-spacing: -.025em; }
.motion .reveal .line > span { transform: translateY(112%); transition: transform 1.05s var(--out); }
.motion .reveal.in .line > span { transform: none; }

.rows { margin: 0; }
.row { position: relative; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 4px 24px; align-items: baseline; padding: 11px 0; }
.row::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: var(--line); transform-origin: 0 50%; }
.motion .row.reveal::before { transform: scaleX(0); transition: transform 1.2s var(--out); }
.motion .row.reveal.in::before { transform: none; }
dt { color: var(--white); font-size: 16px; line-height: 26px; font-weight: 600; }
dt .line > span { display: flex; align-items: center; gap: 10px; }
dt img { width: 20px; height: 20px; flex: none; transition: transform .5s var(--out); }
dd { margin: 0; color: var(--white); }
@media (hover: hover) {
  .row:hover dt img { transform: translateX(8px) rotate(-6deg) scale(1.18); }
}

.pair { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(16px, 3vw, 40px); align-items: start; padding: clamp(48px, 6vw, 80px) var(--gutter) 0; }
.pair figure:last-child { margin-top: clamp(16px, 4vw, 56px); }
.pair img { width: 100%; height: auto; border-radius: 5px; box-shadow: 0 0 0 1px var(--line); }
.motion .wipe.reveal { clip-path: inset(0 0 100% 0); transition: clip-path 1.3s var(--out); }
.motion .wipe.reveal.in { clip-path: inset(-2px -2px -40px -2px); }

.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(20px, 5vw, 72px); align-items: start; }

/* Studio and RbxNative with the relay between them. */
.relay { display: flex; align-items: center; gap: 12px; margin-top: 8px; color: var(--white); font-size: 13.5px; font-weight: 700; max-width: 22rem; }
.ours { display: flex; align-items: center; gap: 8px; }
.ours svg { fill: var(--indigo); }
.wire { position: relative; flex: 1; height: 2px; background: var(--line); font-style: normal; }
.wire em { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); font: 12px/16px var(--mono); color: var(--dim); }
.wire b { position: absolute; top: -3px; left: 0; width: 8px; height: 8px; border-radius: 1px; background: var(--indigo); opacity: 0; }
.motion .relay.in .wire b { animation: packet 2.6s var(--out) infinite; }
.wire b:nth-child(2) { background: var(--white); }
.motion .relay.in .wire b:nth-child(2) { animation-name: packet-back; animation-delay: .9s; }
.motion .relay.in .wire b:nth-child(3) { animation-delay: 1.8s; }
html:not(.motion) .wire b { opacity: 1; left: 30%; }
html:not(.motion) .wire b:nth-child(2) { left: 66%; }
@keyframes packet { 0% { left: 0; opacity: 1; } 80% { opacity: 1; } 100% { left: calc(100% - 8px); opacity: 0; } }
@keyframes packet-back { 0% { left: calc(100% - 8px); opacity: 1; } 80% { opacity: 1; } 100% { left: 0; opacity: 0; } }

pre { margin: 0; padding: 18px 20px; overflow-x: auto; background: var(--panel); border-radius: 5px; box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; line-height: 22px; color: var(--white); }
.c { color: var(--dim); }

.changes { list-style: none; margin: 0; padding: 0; color: var(--white); }
.changes li { position: relative; padding: 13px 0; }
.changes li::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: var(--line); transform-origin: 0 50%; }
.motion .changes li.reveal::before { transform: scaleX(0); transition: transform 1.1s var(--out); }
.motion .changes li.reveal.in::before { transform: none; }

/* The one loud block. */
.credit { margin-top: clamp(64px, 8vw, 112px); background: var(--indigo); color: #15161f; padding: clamp(36px, 4vw, 56px) max(var(--gutter), calc((100vw - 1240px) / 2 + var(--gutter))); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(20px, 5vw, 72px); align-items: start; }
.credit h2 { color: var(--black); font-size: clamp(34px, 4.2vw, 56px); line-height: 1.02; letter-spacing: -.035em; margin: 0; }
.credit-text { max-width: 38rem; }
.credit .lead { color: var(--black); }
.credit a { color: var(--black); text-decoration-color: #0a0a0b88; }
.credit a:hover { text-decoration-color: var(--black); }

footer { max-width: 1240px; margin: 0 auto; padding: 28px var(--gutter) 36px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 14px; line-height: 21px; }
.foot-links span { color: var(--dim); margin-left: auto; max-width: 36rem; }

@media (max-width: 860px) {
  .pitch, .split, .pair, .credit { grid-template-columns: minmax(0, 1fr); }
  .pair figure:last-child { margin-top: 0; }
  .row { grid-template-columns: minmax(0, 1fr); }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 8px; padding-top: 76px; padding-bottom: 44px; }
  .toy { order: 0; justify-self: center; max-width: 300px; }
  h1 { font-size: 38px; }
  .split > div:first-child { margin-bottom: 8px; }
  .nav-links a:nth-child(2) { display: none; }
  .foot-links span { margin-left: 0; }
}

@media (max-width: 860px) {
  .hero { overflow-x: clip; }
}
