:root {
  --paper: #f7f4ef;
  --ink: #161410;
  --muted: #635f57;
  --line: #d9d2c8;
  --red: #f0442d;
  --deep-red: #bf210e;
  --green: #16de7b;
  --yellow: #ffbb35;
  --cyan: #47c9c3;
  --purple: #81449f;
  --display: "Avenir Next", Avenir, "Trebuchet MS", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --utility: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --content: min(1200px, calc(100vw - 48px));
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  background: var(--paper);
  color-scheme: light;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(240, 68, 45, 0.2);
}

a:hover {
  color: var(--deep-red);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 4px;
}

img,
video {
  display: block;
  max-width: 100%;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: var(--display);
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-wrap: balance;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: 8px;
  background: var(--ink);
  color: white;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  width: var(--content);
  min-height: 92px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14px;
  font-weight: 650;
}

.site-header nav a {
  text-decoration: none;
}

.nav-download {
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
}

.nav-download:hover {
  background: var(--deep-red);
  color: white;
}

.hero {
  display: grid;
  width: var(--content);
  min-height: 720px;
  margin: 0 auto;
  grid-template-columns: 1.06fr 0.94fr;
  align-items: center;
  gap: clamp(30px, 5vw, 90px);
  padding: 76px 0 92px;
}

.hero h1 {
  max-width: 760px;
  margin-bottom: 30px;
  font-size: clamp(56px, 7vw, 98px);
  font-weight: 800;
}

.hero h1 span {
  color: var(--deep-red);
}

.hero-lede {
  max-width: 580px;
  margin-bottom: 32px;
  color: #48433c;
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.45;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.app-store-button {
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  gap: 11px;
  padding: 8px 18px 9px 15px;
  border-radius: 11px;
  background: var(--ink);
  color: white;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.05;
  text-decoration: none;
  transition: background-color 160ms ease-out, transform 160ms ease-out;
}

.app-store-button:hover {
  background: var(--deep-red);
  color: white;
  transform: translateY(-2px);
}

.app-store-button small {
  display: block;
  margin-bottom: 2px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.apple-mark {
  font-size: 34px;
  line-height: 1;
}

.text-link {
  font-size: 14px;
  font-weight: 700;
}

.hero-art {
  position: relative;
  min-height: 520px;
  isolation: isolate;
}

.hero-icon {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: min(88%, 480px);
  height: auto;
  transform: translate(-50%, -50%) rotate(4deg);
  filter: drop-shadow(0 28px 22px rgba(69, 28, 10, 0.18));
}

.hero-word {
  position: absolute;
  z-index: 1;
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: -0.07em;
}

.hero-word-one {
  top: -9%;
  right: -16%;
  color: var(--purple);
  font-size: clamp(56px, 8vw, 116px);
  transform: rotate(12deg);
}

.hero-word-two {
  bottom: 0;
  left: -5%;
  color: var(--cyan);
  font-family: var(--utility);
  font-size: clamp(28px, 5vw, 62px);
  transform: rotate(-8deg);
}

.paper {
  position: absolute;
  z-index: 5;
  width: 50px;
  height: 20px;
}

.paper-red {
  top: 5%;
  left: 11%;
  background: var(--red);
  transform: rotate(-26deg);
}

.paper-green {
  top: 34%;
  right: -3%;
  background: var(--green);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  transform: rotate(20deg);
}

.paper-yellow {
  right: 8%;
  bottom: 10%;
  width: 60px;
  background: var(--yellow);
  transform: skew(-15deg) rotate(-14deg);
}

.paper-cyan {
  bottom: 15%;
  left: -2%;
  width: 32px;
  height: 55px;
  background: var(--cyan);
  transform: rotate(32deg);
}

.paper-purple {
  top: 19%;
  left: 1%;
  width: 32px;
  height: 32px;
  border: 9px solid var(--purple);
  border-radius: 50%;
}

.demo-section {
  padding: 110px 0 120px;
  background: var(--ink);
  color: white;
}

.section-intro {
  display: grid;
  width: var(--content);
  margin: 0 auto 48px;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: end;
  gap: 80px;
}

.section-intro h2,
.mouse-copy h2,
.source-copy h2,
.final-cta h2 {
  margin-bottom: 0;
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 750;
}

.section-intro > p {
  max-width: 470px;
  margin: 0;
  color: #c7c1b8;
  font-size: 18px;
}

.mac-stage {
  position: relative;
  width: min(1400px, calc(100vw - 32px));
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #3d3a35;
  border-radius: var(--radius);
  background: #050505;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.36);
  cursor: crosshair;
}

.mac-toolbar {
  position: absolute;
  z-index: 3;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  background: rgba(19, 18, 17, 0.9);
  color: #98938c;
  font-size: 12px;
}

.mac-toolbar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #55514d;
}

.mac-toolbar b {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 600;
}

.mac-stage video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.confetti-layer {
  position: absolute;
  z-index: 5;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti-piece {
  position: absolute;
  top: 0;
  width: 10px;
  height: 17px;
  opacity: 0;
  animation: confetti-fall 1100ms cubic-bezier(0.2, 0.7, 0.25, 1) forwards;
}

@keyframes confetti-fall {
  0% {
    opacity: 1;
    transform: translate3d(0, -12px, 0) rotate(0);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift), var(--fall), 0) rotate(var(--spin));
  }
}

.feature-run {
  width: var(--content);
  margin: 0 auto;
  padding: 100px 0 120px;
}

.feature-run article {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 28px;
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}

.feature-run article:first-child {
  border-top: 1px solid var(--line);
}

.feature-mark {
  align-self: start;
  color: var(--red);
  font-family: var(--display);
  font-size: 72px;
  font-weight: 700;
  line-height: 0.85;
}

.pointer-mark {
  color: var(--cyan);
}

.feature-run h2 {
  margin-bottom: 12px;
  font-size: clamp(32px, 4vw, 58px);
  font-weight: 700;
}

.feature-run p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
}

.mouse-demo {
  display: grid;
  min-height: 720px;
  grid-template-columns: minmax(330px, 0.72fr) minmax(0, 1.28fr);
  background: var(--green);
}

.mouse-copy {
  align-self: center;
  padding: clamp(48px, 8vw, 120px);
}

.mouse-copy h2 {
  margin-bottom: 30px;
}

.mouse-copy > p:last-child {
  max-width: 460px;
  margin-bottom: 0;
  color: #154d35;
  font-size: 19px;
}

.video-crop {
  min-width: 0;
  overflow: hidden;
}

.video-crop video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.open-source {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: clamp(60px, 10vw, 160px);
  padding: 120px max(24px, calc((100vw - 1200px) / 2));
  background: var(--purple);
  color: white;
}

.source-copy h2 {
  margin-bottom: 30px;
}

.source-copy > p {
  max-width: 650px;
  color: #f0ddf5;
  font-size: 19px;
}

.source-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 35px;
}

.github-button {
  display: inline-flex;
  padding: 13px 17px;
  border-radius: 9px;
  background: white;
  color: #4c195d;
  font-weight: 700;
  text-decoration: none;
}

.source-actions > a:not(.github-button) {
  color: white;
}

.source-facts {
  align-self: center;
}

.source-facts dl {
  margin: 0;
}

.source-facts dl div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
  padding: 19px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}

.source-facts dl div:first-child {
  border-top: 1px solid rgba(255, 255, 255, 0.28);
}

.source-facts dt {
  color: #e0b8eb;
  font-family: var(--utility);
  font-size: 12px;
  text-transform: uppercase;
}

.source-facts dd {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
}

.final-cta {
  display: grid;
  width: var(--content);
  min-height: 420px;
  margin: 0 auto;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 44px;
  padding: 80px 0;
}

.final-cta img {
  width: 150px;
  height: 150px;
}

.final-cta h2 {
  max-width: 700px;
  margin-bottom: 10px;
}

.final-cta p {
  margin: 0;
  color: var(--muted);
  font-size: 20px;
}

.seo-copy {
  padding: 100px max(24px, calc((100vw - 1200px) / 2));
  background: #ebe5dc;
}

.seo-copy > h2 {
  max-width: 820px;
  margin-bottom: 56px;
  font-size: clamp(40px, 5vw, 68px);
  font-weight: 750;
}

.seo-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 72px);
}

.seo-columns h3 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.seo-columns p {
  max-width: 68ch;
  margin-bottom: 0;
  color: #575149;
  font-size: 16px;
  line-height: 1.7;
  text-wrap: pretty;
}

footer {
  display: flex;
  width: var(--content);
  min-height: 110px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

footer p {
  margin: 0;
}

footer nav {
  display: flex;
  gap: 22px;
}

.footer-brand {
  color: var(--ink);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 900px) {
  :root {
    --content: min(100% - 32px, 720px);
  }

  .site-header nav > a:not(.nav-download) {
    display: none;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 58px 0 70px;
  }

  .hero-copy {
    position: relative;
    z-index: 2;
  }

  .hero-art {
    min-height: 460px;
  }

  .section-intro,
  .open-source {
    grid-template-columns: 1fr;
  }

  .section-intro {
    gap: 24px;
  }

  .mouse-demo {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .mouse-copy {
    padding: 80px 24px;
  }

  .video-crop {
    aspect-ratio: 16 / 10;
  }

  .open-source {
    gap: 60px;
    padding-top: 90px;
    padding-bottom: 90px;
  }

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

  .final-cta {
    grid-template-columns: 100px 1fr;
  }

  .final-cta img {
    width: 100px;
    height: 100px;
  }

  .final-cta .app-store-button {
    grid-column: 2;
    justify-self: start;
  }
}

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

  .site-header {
    min-height: 76px;
  }

  .brand span {
    display: none;
  }

  .hero {
    padding-top: 44px;
  }

  .hero h1 {
    font-size: clamp(48px, 15vw, 68px);
  }

  .hero-actions,
  .source-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-art {
    min-height: 360px;
  }

  .hero-icon {
    width: min(88%, 340px);
  }

  .hero-word-one {
    top: -4%;
    right: -5%;
  }

  .demo-section {
    padding: 80px 0;
  }

  .section-intro {
    margin-bottom: 32px;
  }

  .mac-stage {
    width: calc(100vw - 16px);
    border-radius: 10px;
  }

  .mac-toolbar {
    height: 30px;
  }

  .feature-run {
    padding: 72px 0 82px;
  }

  .feature-run article {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px;
    padding: 34px 0;
  }

  .feature-mark {
    font-size: 48px;
  }

  .feature-run h2 {
    font-size: 34px;
  }

  .source-facts dl div {
    grid-template-columns: 110px 1fr;
  }

  .final-cta {
    grid-template-columns: 72px 1fr;
    gap: 22px;
    padding: 72px 0;
  }

  .final-cta img {
    width: 72px;
    height: 72px;
  }

  .final-cta h2 {
    font-size: 36px;
  }

  .seo-copy {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .seo-copy > h2 {
    margin-bottom: 42px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 34px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .confetti-layer {
    display: none;
  }
}
