:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --text: #1d1d1f;
  --text-soft: #5f6368;

  --text-faint: #74747a;
  --line: #e5e5e7;
  --accent: #4b56c0;
  --pill: #f1f1f4;
  --page: 760px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

:root {
  --gap-tight: 8px;
  --gap-text: 16px;
  --gap-block: 24px;
  --gap-item: 32px;
  --gap-section: 48px;
  --gap-page: 96px;

  --selection: #d7e0ff;
}

@media (prefers-color-scheme: dark) {
  :root { --selection: #333a70; }
}

::selection {
  background: var(--selection);
  color: var(--text);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 32px;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 12px;

  color: var(--bg);
  background: var(--accent);
  border-radius: 6px;
  transform: translateY(-150%);
}

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

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(calc(100% - 40px), var(--page));
  min-height: 64px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  flex: none;
  width: 18px;
  height: 18px;
}

.nav-links {
  display: flex;
  align-items: center;
  align-self: stretch;
  gap: 28px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.nav-links > a {
  padding: 12px 0;
  margin: -12px 0;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: var(--gap-section);
  width: min(calc(100% - 40px), var(--page));
  margin: 0 auto;
  padding: var(--gap-page) 0;
}

.hero-apps {
  position: relative;

  width: 260px;
  height: 220px;
  perspective: 600px;

  cursor: grab;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.hero-apps.is-dragging,
.hero-apps.is-dragging .hero-app { cursor: grabbing; }

.hero-apps.is-dragging .hero-stage { transition: none; }

.hero-apps.is-dragging .hero-app:hover .hero-app-tile,
.hero-apps.is-dragging .hero-app:focus-visible .hero-app-tile { transform: none; }

.hero-apps.is-dragging .hero-app-tile::after {
  opacity: 0;
  transition: none;
}

.hero-stage {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;

  transform: rotateX(calc(-16deg + var(--tilt-x, 0deg))) rotateY(var(--tilt-y, 0deg));
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-stage,
.hero-ground,
.hero-ring,
.hero-spoke,
.hero-unspin { pointer-events: none; }

.hero-app { pointer-events: auto; }

.hero-ground {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 210px;
  height: 210px;
  margin: -105px 0 0 -105px;
  transform: translateY(74px) rotateX(90deg);
  background: radial-gradient(closest-side,
    rgba(29, 29, 31, 0.12), rgba(29, 29, 31, 0.05) 55%, transparent 72%);
}

.hero-ring {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateY(var(--theta, 0deg));
}

.hero-spoke {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 88px;
  height: 88px;
  margin: -44px 0 0 -44px;
  transform-style: preserve-3d;
  transform: rotateY(var(--phi)) translateZ(80px);
}

.hero-spoke:nth-child(1) { --phi: 0deg; }
.hero-spoke:nth-child(2) { --phi: 90deg; }
.hero-spoke:nth-child(3) { --phi: 180deg; }
.hero-spoke:nth-child(4) { --phi: 270deg; }

.hero-unspin {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateY(calc(-1 * var(--theta, 0deg)));
}

.hero-app {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateY(calc(-1 * var(--phi))) rotateX(16deg);
}

.hero-app::before {
  content: "";
  position: absolute;
  inset: -8px;
}

.hero-app-tile {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: app-in 620ms cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: transform 750ms linear(
    0, 0.1987, 0.613, 1.0061, 1.2423, 1.2967, 1.221, 1.0941, 0.9826, 0.9214,
    0.913, 0.9399, 0.9782, 1.0094, 1.0249, 1.0252, 1.0161, 1.0047, 0.9961, 0.9923, 1);
}

.hero-app:hover .hero-app-tile,
.hero-app:focus-visible .hero-app-tile {
  transform: translateZ(28px) scale(1.08);
}

.hero-spoke:nth-child(2) .hero-app-tile { animation-delay: 70ms; }
.hero-spoke:nth-child(3) .hero-app-tile { animation-delay: 140ms; }
.hero-spoke:nth-child(4) .hero-app-tile { animation-delay: 210ms; }

@keyframes app-in {
  from { opacity: 0; transform: translateY(12px) scale(0.9); }
  to { opacity: 1; transform: none; }
}

.hero-app img {
  display: block;
  width: 100%;
  height: 100%;
  opacity: calc(0.775 + 0.225 * cos(var(--theta, 0deg) + var(--phi)));
  filter: blur(calc((1 - cos(var(--theta, 0deg) + var(--phi))) * 0.75px))
          saturate(calc(0.925 + 0.075 * cos(var(--theta, 0deg) + var(--phi))));
}

.hero-app-tile::after {
  content: attr(data-app);
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 0);
  padding: 3px 10px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  color: var(--text);
  background: var(--pill);
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.hero-app:hover .hero-app-tile::after,
.hero-app:focus-visible .hero-app-tile::after {
  opacity: 1;
  transform: translate(-50%, 4px);
  transition-delay: 60ms;
}

.hero-app:focus-visible {
  border-radius: 24%;
}

h1 {
  margin: 0;
  font-size: clamp(40px, 5.6vw, 54px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero-copy {
  max-width: 600px;
  margin: var(--gap-block) 0 0;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.6;
  text-wrap: pretty;
}

.layout {
  width: min(calc(100% - 40px), var(--page));
  margin: 0 auto;
}

.row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);

  gap: var(--gap-block) var(--gap-section);
  padding: var(--gap-item) 0 var(--gap-section);
  border-top: 1px solid var(--line);
}

.row-label {
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.row-copy {
  max-width: 620px;
  margin: 0 0 var(--gap-text);
  color: var(--text-soft);
}

.row-copy:last-child { margin-bottom: 0; }

.row-link {
  display: inline-block;
  margin-top: var(--gap-block);
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.row-link:hover { text-decoration: underline; }

.notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-item);
}

.note h3 {
  margin: 0 0 var(--gap-tight);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.note p {
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.55;
}

.site-footer {
  padding: 32px 20px 44px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: var(--text-faint);
  font-size: 13px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 18px;
  margin-bottom: 8px;
}

.footer-links,
.footer-social {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-social::before {
  content: "";
  width: 1px;
  height: 13px;
  background: var(--line);
}

.footer-links a,
.footer-social a {

  padding: 8px 0;
  margin: -8px 0;
  color: var(--text-soft);
  font-size: 13px;
  text-decoration: none;
}

.footer-links a:hover,
.footer-social a:hover { color: var(--text); }

@media (max-width: 720px) {
  :root { --gap-page: 64px; }
  .row { grid-template-columns: minmax(0, 1fr); }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    row-gap: var(--gap-item);
  }
  .hero-apps {
    display: flex;
    gap: var(--gap-tight);
    width: auto;
    height: auto;
    perspective: none;
    margin-left: calc(56px * -0.0859);
  }
  .hero-stage,
  .hero-ring,
  .hero-spoke,
  .hero-unspin { display: contents; }
  .hero-ground { display: none; }

  .hero-app {
    width: 56px;
    height: 56px;
    transform: none;
  }
  .hero-app img { opacity: 1; filter: none; }
  .hero-app-tile::after { display: none; }

  .hero-app::before { display: none; }
}

@media (max-width: 600px) {
  .notes { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .nav,
  .hero,
  .layout { width: min(calc(100% - 32px), var(--page)); }
  .hero-copy { font-size: 17px; }
  .nav-links { gap: 18px; }
}

@media (prefers-color-scheme: dark) {
  .hero-ground {
    background: radial-gradient(closest-side,
      rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.22) 55%, transparent 72%);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111214;
    --text: #f2f2f3;
    --text-soft: #b1b3b8;
    --text-faint: #85878d;
    --line: #2c2d31;
    --accent: #aab0ff;
    --pill: #26272c;
  }
}

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

  .hero-app-tile { animation: none; transition: none; }
  .hero-stage { transition: none; }
  .hero-app:hover .hero-app-tile,
  .hero-app:focus-visible .hero-app-tile { transform: none; }
  .hero-app-tile::after { transition: none; }
  .hero-app:hover .hero-app-tile::after,
  .hero-app:focus-visible .hero-app-tile::after { transform: translate(-50%, 4px); }
}

@media print {
  :root { color-scheme: light; }

  .hero-app-tile { animation: none; }
  .site-header,
  .site-footer,
  .skip-link { display: none; }
  body { color: #000; background: #fff; }
  .hero,
  .layout { width: 100%; }
  .hero { padding: 20px 0; }
  a { color: #000; }
}
