/* Symbols under the cursor: the home page of an invented editing app, one big headline whose letters turn into
   symbols near a cursor, and two cursors with name tags: yours and a colleague's. */
:root {
  --paper: #f6f4ef;         /* the page */
  --ink: #1b1916;           /* text */
  --red: #e5372b;           /* the brand */
  --mate: #ff5004;          /* the colleague's tag */
  --edge: clamp(18px, 3.4vw, 52px);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--paper);
  color: var(--ink);
  font-family: 'Instrument Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* with a mouse the page draws its own cursor */
html.has-cursor,
html.has-cursor * {
  cursor: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

/* ---------------------------------------------------------------- the bar */
.bar {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 22px var(--edge);
  font-size: 15px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* the mark: a short red stroke, like a correction in the margin */
.brand__mark {
  width: 18px;
  height: 4px;
  border-radius: 2px;
  background: var(--red);
  transform: rotate(-24deg);
}

.bar__nav {
  display: flex;
  gap: clamp(14px, 2.4vw, 34px);
  margin-left: auto;
}

.bar__nav a,
.bar__login {
  transition: opacity 0.2s;
}

@media (hover: hover) {
  .bar__nav a:hover,
  .bar__login:hover {
    opacity: 0.5;
  }
}

.bar__login {
  padding: 9px 16px;
  border: 1px solid rgba(27, 25, 22, 0.22);
  border-radius: 999px;
}

/* ---------------------------------------------------------------- the headline */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(18px, 2.4vw, 32px);
  padding: 0 var(--edge) 8vh;
  touch-action: none;       /* a finger on the page plays with the letters */
}

.title {
  margin: 0;
  font-size: clamp(54px, 12.2vw, 196px);
  font-weight: 600;
  font-stretch: 92%;
  line-height: 0.94;
  letter-spacing: -0.045em;
  user-select: none;
  -webkit-user-select: none;
}

/* a word never breaks inside; each letter is a box with the glyph in it */
.word {
  display: inline-block;
  white-space: nowrap;
}

.ch {
  display: inline-block;
  will-change: transform;
}

.ch-i {
  display: inline-block;
}

.lead {
  max-width: 44ch;
  margin: 0;
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.45;
  opacity: 0.75;
}

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

.btn {
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  font-weight: 600;
  transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(27, 25, 22, 0.25);
}

@media (hover: hover) {
  .btn:hover {
    transform: scale(1.05);
  }
}

.btn:focus-visible,
.bar a:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------- the cursors */
.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
}

.cursor.is-on {
  opacity: 1;
}

/* the body tilts around the tip of the arrow and lifts with the speed */
.cursor__body {
  position: relative;
  transform-origin: 3px 2px;
  transform: translateY(var(--lift, 0px)) rotate(var(--tilt, 0deg));
}

.cursor__arrow {
  display: block;
  width: 22px;
  height: 26px;
  fill: var(--ink);
  stroke: #fff;
  stroke-width: 1.6;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.18));
}

.cursor__chip {
  position: absolute;
  left: 18px;
  top: 22px;
  padding: 4px 9px 5px;
  border-radius: 7px 7px 7px 2px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.cursor--mate .cursor__arrow {
  fill: var(--mate);
}

.cursor--mate .cursor__chip {
  background: var(--mate);
}

/* ---------------------------------------------------------------- phone */
@media (max-width: 760px) {
  .bar__nav {
    display: none;
  }

  .bar__login {
    margin-left: auto;
  }

  .title {
    font-size: clamp(46px, 14.5vw, 72px);
  }
}
