@font-face {
  font-family: "Google Sans";
  src: url("fonts/google-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Google Sans Code";
  src: url("fonts/google-sans-code.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #ffffff;
  --tint: #f5f6f8;
  --line: #e3e5ea;
  --text: #111318;
  --muted: #5a5f6b;
  --link: #3f3cc9;
  --font: "Google Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Google Sans Code", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--link);
  text-underline-offset: 3px;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.015em;
}

p {
  margin: 0;
}

figure {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  padding: 8px 12px;
  background: var(--text);
  color: #fff;
}

/* Navigation */

.nav {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgb(255 255 255 / 92%);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 60px;
}

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

.nav-links {
  display: flex;
  gap: 26px;
  font-size: 15px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--text);
}

/* Hero */

.hero {
  padding: clamp(40px, 6vw, 72px) 0 0;
}

.hero h1 {
  max-width: 22ch;
  font-size: clamp(38px, 4.6vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.lede {
  max-width: 680px;
  margin-top: 20px;
  font-size: clamp(18px, 1.6vw, 20px);
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}

.btn:hover {
  border-color: #c5c8d0;
}

.btn-primary {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

.btn-primary:hover {
  background: #2a2d35;
  border-color: #2a2d35;
}

.meta {
  margin-top: 18px;
  font-size: 14px;
  color: var(--muted);
}

/* Sections */

.section {
  padding: clamp(72px, 10vw, 128px) 0;
  border-top: 1px solid var(--line);
}

.section-tint {
  background: var(--tint);
}

.section h2 {
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.section-intro {
  max-width: 620px;
  margin-top: 16px;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
}

.split-head p {
  margin-top: 16px;
  color: var(--muted);
}

/* Screenshots */

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: clamp(48px, 6vw, 72px);
}

.pair img,
.example img {
  border: 1px solid var(--line);
  border-radius: 10px;
}

figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

/* Examples */

.examples {
  display: grid;
  gap: clamp(56px, 8vw, 104px);
  margin-top: clamp(48px, 6vw, 72px);
}

.example {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.example:nth-child(even) {
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
}

.example:nth-child(even) .example-text {
  order: 2;
}

.example-kind {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.example blockquote {
  margin: 10px 0 0;
  font-size: clamp(19px, 1.8vw, 23px);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.example blockquote::before {
  content: "\201C";
}

.example blockquote::after {
  content: "\201D";
}

.example figcaption {
  margin-top: 0;
  font-size: inherit;
  color: var(--text);
}

.example-result {
  margin-top: 16px;
  font-size: 15px;
  color: var(--muted);
}

.example img {
  border: 0;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgb(17 19 24 / 6%), 0 12px 32px -12px rgb(17 19 24 / 18%);
}

/* Product shot under the hero */

.hero-shot {
  margin-top: clamp(48px, 6vw, 72px);
}

.hero-shot img {
  border-radius: 14px;
  border: 1px solid #2a2d35;
  box-shadow: 0 2px 4px rgb(17 19 24 / 8%), 0 32px 64px -24px rgb(17 19 24 / 35%);
}

/* Features */

.feature {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 48px;
  margin-top: 48px;
}

.feature h3 {
  font-size: 18px;
}

.feature p {
  margin-top: 8px;
  color: var(--muted);
}

.more {
  width: 100%;
  margin-top: 72px;
  border-collapse: collapse;
  font-size: 16px;
}

.more caption {
  padding-bottom: 12px;
  text-align: left;
  font-size: 18px;
  font-weight: 600;
}

.more th,
.more td {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.more th {
  width: 200px;
  padding-right: 24px;
  font-weight: 500;
}

.more td {
  color: var(--muted);
}

.skills {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(32px, 5vw, 72px);
  margin-top: 88px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.skills-head h3 {
  font-size: 24px;
  letter-spacing: -0.02em;
}

.skills-head p {
  margin-top: 12px;
  color: var(--muted);
}

.skills-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 40px;
  margin: 0;
}

.skills-list dt {
  font-weight: 600;
}

.skills-list dd {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.skill-lead {
  grid-column: 1 / -1;
  padding: 20px 22px;
  border-radius: 10px;
  background: var(--tint);
}

.skill-lead dt {
  font-size: 18px;
}

/* Click to enlarge */

.zoomable {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.zoomable:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 4px;
  border-radius: 10px;
}

.zoom {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 24px;
  border: 0;
  background: transparent;
  cursor: zoom-out;
}

.zoom::backdrop {
  background: rgb(10 11 14 / 88%);
}

.zoom[open] {
  display: grid;
  place-items: center;
}

.zoom img {
  max-width: 100%;
  max-height: calc(100vh - 48px);
  width: auto;
  height: auto;
  border-radius: 8px;
}

/* Status */

.status {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.status h3 {
  font-size: 18px;
}

.status ul {
  margin: 12px 0 16px;
  padding-left: 18px;
  color: var(--muted);
}

.status li + li {
  margin-top: 10px;
}

/* Install */

.reqs {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 24px;
  margin: 28px 0 0;
  font-size: 15px;
}

.reqs dt {
  font-weight: 500;
}

.reqs dd {
  margin: 0;
  color: var(--muted);
}

.install pre {
  margin: 0;
  padding: 24px 28px;
  overflow-x: auto;
  background: var(--text);
  color: #e8e9ed;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.8;
}

.install pre code {
  font-size: inherit;
}

.install p {
  margin-top: 16px;
  font-size: 15px;
  color: var(--muted);
}

/* Footer */

.footer {
  padding: 32px 0 48px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer .brand {
  font-size: 16px;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.footer nav a {
  color: var(--muted);
  text-decoration: none;
}

.footer nav a:hover {
  color: var(--text);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Story: the same request in a chat and in Meowbert */

.story {
  padding: clamp(36px, 4vw, 48px) 0 clamp(72px, 10vw, 120px);
}

.request {
  max-width: 820px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--tint);
}

.request-label {
  font-size: 14px;
  color: var(--muted);
}

.request-text {
  margin-top: 6px;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.45;
}

.player-controls {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 28px;
}

.player-controls[hidden] {
  display: none;
}

.player-arrow {
  flex: none;
  width: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 18px;
  cursor: pointer;
}

.player-arrow:hover {
  border-color: #c5c8d0;
}

.player-arrow:disabled {
  color: #c5c8d0;
  cursor: default;
}

.player-steps {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.player-steps button {
  position: relative;
  width: 100%;
  padding: 12px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.player-steps button span {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
}

.player-steps button::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 0;
  background: var(--text);
}

.player-steps button[aria-current="step"] {
  border-color: var(--text);
  color: var(--text);
}

.player-steps button.is-past::after {
  width: 100%;
}

.player-steps button[aria-current="step"].is-playing::after {
  animation: step-fill var(--step-ms, 4200ms) linear forwards;
}

@keyframes step-fill {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  margin-top: 76px;
}

.col {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  padding: 20px;
}

.col-title {
  margin-bottom: 16px;
  font-size: 15px;
  font-weight: 500;
}

.beat {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.beat + .beat {
  margin-top: 14px;
}

.beat.is-future {
  visibility: hidden;
  opacity: 0;
  transform: translateY(6px);
}

/* Chat column */

.col-chat {
  border: 1px solid var(--line);
  background: var(--bg);
}

.col-chat .col-title {
  color: var(--muted);
}

.chat {
  display: flex;
  flex-direction: column;
}

.chat .beat {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bubble {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.5;
}

.bubble-ai {
  align-self: flex-start;
  background: var(--tint);
}

.bubble-you {
  align-self: flex-end;
  background: #e8e9ee;
}

.files {
  display: block;
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.mini {
  border-collapse: collapse;
  font-size: 13px;
}

.mini th,
.mini td {
  padding: 3px 14px 3px 0;
  text-align: left;
}

.mini th {
  color: var(--muted);
  font-weight: 500;
}

.mini .wrong td:last-child {
  text-decoration: underline wavy #c63b3b;
  text-underline-offset: 4px;
}

.aside {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.aside-wrong {
  color: #b03535;
}

/* Meowbert column, styled after the app's task view */

.col-mb {
  background: #0f1012;
  color: #eeeff1;
}

.col-mb .col-title {
  color: #a6aab2;
}

.app {
  display: flex;
  flex-direction: column;
  font-size: 15px;
}

.app-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
}

.app-task {
  font-weight: 600;
}

.app-mode {
  font-size: 13px;
  color: #91b4ef;
}

.app-msg {
  padding: 12px 14px;
  border-radius: 10px;
  background: #1b1d20;
  line-height: 1.5;
}

.app-note {
  margin-top: 10px;
  font-size: 13px;
  color: #767b84;
  text-align: center;
}

.log {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.log li {
  padding: 6px 0 6px 22px;
  text-indent: -22px;
  color: #c9ccd2;
}

.log code {
  color: #eeeff1;
}

.ok {
  display: inline-block;
  width: 22px;
  text-indent: 0;
  color: #5cc98c;
}

.run {
  display: inline-block;
  width: 22px;
  text-indent: 0;
  color: #91b4ef;
}

.lanes {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.lanes span {
  height: 6px;
  border-radius: 3px;
  background: #222428;
  overflow: hidden;
}

.lanes span::before {
  content: "";
  display: block;
  height: 100%;
  width: 100%;
  background: #91b4ef;
  transform-origin: left;
}

.beat.is-current .lanes span::before {
  animation: lane 3.6s ease-out both;
}

.lanes span:nth-child(2)::before { animation-delay: 0.2s; }
.lanes span:nth-child(3)::before { animation-delay: 0.45s; }
.lanes span:nth-child(4)::before { animation-delay: 0.1s; }
.lanes span:nth-child(5)::before { animation-delay: 0.6s; }
.lanes span:nth-child(6)::before { animation-delay: 0.3s; }

@keyframes lane {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.review {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid;
  line-height: 1.5;
}

.review-head {
  font-size: 13px;
  font-weight: 600;
}

.review-no {
  border-color: rgb(239 108 108 / 45%);
  background: rgb(239 108 108 / 8%);
}

.review-no .review-head {
  color: #f08c8c;
}

.review-yes {
  border-color: rgb(92 201 140 / 45%);
  background: rgb(92 201 140 / 8%);
}

.review-yes .review-head {
  color: #5cc98c;
}

.beat .review + .log,
.beat .review + .notify {
  margin-top: 10px;
}

.notify {
  padding: 12px 14px;
  border-radius: 12px;
  background: #eeeff1;
  color: #111318;
  font-size: 14px;
  line-height: 1.5;
}

.notify-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-weight: 600;
}

.notify-head span {
  font-weight: 400;
  color: var(--muted);
}

.story-line {
  max-width: 760px;
  margin-top: 32px;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.story-note {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

/* Pixel cat */

.cat {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  image-rendering: pixelated;
}

.cat svg {
  display: block;
  width: 100%;
  height: 100%;
}

.cat:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 4px;
}

.cat-perch {
  position: absolute;
  top: -62px;
  right: 24px;
  width: 64px;
  height: 64px;
}

.cat-perch .cat {
  width: 64px;
  height: 64px;
}

.cat-perch.is-alert .cat {
  animation: hop 0.4s ease-out;
}

@keyframes hop {
  40% {
    transform: translateY(-10px);
  }
}

.cat-bang {
  position: absolute;
  top: -22px;
  left: 50%;
  width: 8px;
  margin-left: -4px;
  pointer-events: none;
}

.heart {
  position: absolute;
  width: 21px;
  height: 18px;
  pointer-events: none;
  animation: float-up 1.2s ease-out forwards;
}

@keyframes float-up {
  from {
    opacity: 1;
    transform: translate(0, 0);
  }
  to {
    opacity: 0;
    transform: translate(var(--dx, 0px), -48px);
  }
}

.cat-bed {
  position: relative;
  width: 80px;
  height: 40px;
}

.cat-bed .cat {
  width: 80px;
  height: 40px;
}

.zzz {
  position: absolute;
  top: -14px;
  right: -6px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  pointer-events: none;
  animation: drift 2.4s ease-in-out infinite;
}

@keyframes drift {
  0%,
  100% {
    opacity: 0.3;
    transform: translate(0, 0);
  }
  50% {
    opacity: 1;
    transform: translate(4px, -6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .beat,
  .heart,
  .zzz,
  .cat,
  .lanes span::before,
  .player-steps button::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Narrow screens */

@media (max-width: 960px) {
  .nav-links a:not([href^="https"]) {
    display: none;
  }

  .split,
  .pair,
  .status,
  .skills {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature {
    grid-template-columns: 1fr 1fr;
  }

  .example,
  .example:nth-child(even) {
    grid-template-columns: minmax(0, 1fr);
  }

  .example:nth-child(even) .example-text {
    order: 0;
  }

  .columns {
    grid-template-columns: 1fr;
    gap: 80px;
    margin-top: 20px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .feature,
  .skills-list {
    grid-template-columns: 1fr;
  }

  .more th {
    width: 120px;
  }

  .player-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .player-steps button {
    padding: 10px 8px 12px;
    font-size: 0;
  }

  .player-steps button span {
    font-size: 13px;
  }

  .player-arrow {
    width: 40px;
  }

  .request,
  .col {
    padding: 18px 16px;
  }

}
