:root {
  --paper: #f4f3ef;
  --card: #ffffff;
  --ink: #131417;
  --muted: #7d8088;
  --soft: #a9abb2;
  --faint: #d2d3d8;
  --line: rgba(19, 20, 23, 0.08);
  --accent: #3550f2;
  --accent-wash: rgba(53, 80, 242, 0.07);
  --code: clamp(9px, min(0.9vw + 5px, 2.4vh), 17px);
  --title: clamp(30px, min(8.4vw, 10.6vh), 104px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  height: 100vh;
  display: grid;
  place-items: center;
  padding: 0 clamp(14px, 5vw, 64px);
  overflow: hidden;
}
.scene {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 1040px;
}
.editor, .render { grid-area: 1 / 1; }

/* ---------- the editor ---------- */
.editor {
  background: var(--card);
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(19, 20, 23, 0.05),
    0 10px 24px -10px rgba(19, 20, 23, 0.12),
    0 34px 64px -34px rgba(19, 20, 23, 0.22);
  font-family: "JetBrains Mono Variable", ui-monospace, monospace;
  font-size: var(--code);
  font-weight: 450;
  max-width: 100%;
  overflow: hidden;
}
.editor__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2em;
  padding: 0.85em 1.25em 0.8em 1em;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.tab { display: inline-flex; align-items: center; gap: 0.55em; color: var(--ink); }
.tab__icon { width: 1.15em; height: 1.15em; fill: none; stroke: var(--muted); stroke-width: 1.3; stroke-linejoin: round; }
.editor__lang { font-size: 0.85em; letter-spacing: 0.06em; color: var(--soft); }

.lines { position: relative; padding: 0.9em 1.6em 1.1em 0; }
.line { position: relative; display: flex; line-height: 1.95; white-space: pre; }
.ln { flex: none; width: 3em; padding-right: 1.25em; text-align: right; color: var(--faint); font-size: 0.86em; }
.code { position: relative; }
.t { opacity: 0; }
.tag { color: var(--muted); }
.attr { color: var(--soft); }
.str { color: #5d6069; }
.prop { color: var(--soft); }
.txt { color: var(--ink); }
.acc { color: var(--accent); }
.band {
  position: absolute; left: 0; right: 0; top: 0;
  height: 1.95em;
  background: var(--accent-wash);
  opacity: 0;
}
.caret {
  position: absolute; top: 0; left: 0;
  width: 2px; height: 1.25em;
  background: var(--accent);
  border-radius: 1px;
  opacity: 0;
  transform-origin: 50% 50%;
}

/* ---------- the real hero ---------- */
.render {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(10px, 2.3vh, 24px);
  width: 100%;
  position: relative;
}
.badge {
  margin: 0;
  display: inline-grid;
  place-items: center;
  height: clamp(24px, 3.6vh, 30px);
  padding: 0 0.95em;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 1px 2px rgba(19, 20, 23, 0.05);
  font-size: clamp(10.5px, min(1.1vw + 6px, 1.9vh), 13px);
  font-weight: 560;
  color: var(--muted);
  letter-spacing: 0.01em;
  opacity: 0;
}
.badge { margin-bottom: clamp(10px, 3.2vh, 30px); }
.badge__text { line-height: 1; }

.title {
  margin: 0;
  font-size: var(--title);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 640;
  max-width: 10.5em;
}
.w {
  display: inline-block;
  white-space: nowrap;
  opacity: 0;
  --wd: 100;
  --wg: 640;
  font-variation-settings: "wdth" var(--wd), "wght" var(--wg);
  transform-origin: 0 50%;
  will-change: transform;
}
.title .w { cursor: default; }
.w--em { font-style: italic; color: var(--accent); --wg: 560; }

.rule {
  display: block;
  width: min(220px, 40vw);
  height: 1px;
  background: var(--faint);
  transform: scaleX(0);
  transform-origin: 50% 50%;
}
.sub {
  margin: 0;
  font-size: clamp(13px, min(1.35vw + 7px, 2.6vh), 20px);
  color: var(--muted);
  --wg: 470;
  font-weight: 470;
  letter-spacing: 0;
}

.actions { display: flex; gap: 10px; }
.btn {
  position: relative;
  isolation: isolate;
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  height: clamp(36px, 5.6vh, 46px);
  padding: 0 1.25em;
  border-radius: 999px;
  font-size: clamp(12.5px, min(1vw + 7px, 2.2vh), 15px);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.35s cubic-bezier(.34, 1.56, .64, 1);
}
.btn__bg {
  position: absolute; inset: 0;
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: background-color 0.3s ease;
}
.btn__text { line-height: 1; --wg: 600; }
.btn--solid { color: #fff; }
.btn--solid .btn__bg {
  background: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 1px 2px rgba(19, 20, 23, 0.2), 0 8px 18px -8px rgba(19, 20, 23, 0.45);
}
.btn--ghost { color: var(--ink); }
.btn--ghost .btn__bg { background: rgba(255, 255, 255, 0.6); box-shadow: inset 0 0 0 1px var(--line); }
.btn__arrow { width: 1.05em; height: 1.05em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.btn__arrow-in { transition: transform 0.35s cubic-bezier(.34, 1.56, .64, 1); }
@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); }
  .btn--ghost:hover .btn__bg { background: #fff; }
}
.btn:active { transform: translateY(0) scale(0.97); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* the label with the code that makes a word so */
.peek {
  position: absolute;
  left: 0; top: 0;
  display: inline-grid;
  place-items: center;
  height: clamp(22px, 3.2vh, 26px);
  padding: 0 0.7em;
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  font-family: "JetBrains Mono Variable", ui-monospace, monospace;
  font-size: clamp(10px, min(0.8vw + 6px, 1.8vh), 12px);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 6px 16px -6px rgba(19, 20, 23, 0.4);
}
.peek__text { line-height: 1; }
.peek::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -4px;
  width: 8px; height: 8px;
  margin-left: -4px;
  background: var(--ink);
  border-radius: 1.5px;
  transform: rotate(45deg);
  z-index: -1;
}

.pointer {
  position: absolute; left: 0; top: 0;
  width: 20px; height: 20px;
  fill: var(--ink); stroke: #fff; stroke-width: 1.2; stroke-linejoin: round;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
  z-index: 5;
}

@media (max-width: 520px) {
  .actions { gap: 8px; }
  .editor__lang { display: none; }
}
