/*
  Higo landing page. The page is a highway: a hero scene with the milestone on
  the shoulder, a road that becomes the page spine, and a milestone per chapter
  counting down the kilometres to "hired".
*/
:root {
  color-scheme: light;
  --sky: #d6e3e6;
  --hill: #c3d2d1;
  --sand: #ece2cc;
  --sand-deep: #e1d3b5;
  --stone: #fbf9f4;
  --stone-edge: #dcd3c1;
  --asphalt: #2b2a26;
  --paint: #f4f1e8;
  --yellow: #f5b800;
  --yellow-deep: #c99700;
  --sign: #12643f;
  --sign-ink: #f2f5ef;
  --ink: #1b1914;
  --body-ink: #3d392f;
  --muted: #5e5748;
  --display: "Anek Latin", "Mukta", system-ui, sans-serif;
  --text: "Mukta", system-ui, sans-serif;
  --page-pad: clamp(20px, 4vw, 56px);
  --road: 128px;
  --kerb: 6px;
  --edge-inset: 9px;
  --shoulder: 112px;
  --nav-h: 72px;
  -webkit-text-size-adjust: 100%;
}

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

html {
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

html.motion {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font: 400 18px/1.6 var(--text);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 80%;
  color: var(--ink);
  text-wrap: balance;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  top: -80px;
  left: 12px;
  z-index: 50;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--stone);
  border-radius: 6px;
  font: 600 15px var(--display);
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* Buttons */

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 22px 13px;
  border-radius: 6px;
  background: var(--yellow);
  color: var(--ink);
  box-shadow: inset 0 -4px 0 var(--yellow-deep);
  font: 650 17px/1 var(--display);
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    background-color 0.15s ease;
}

.cta:hover {
  background: #ffc21a;
}

.cta:active {
  transform: translateY(2px);
  box-shadow: inset 0 -2px 0 var(--yellow-deep);
}

.cta .glyph {
  width: 20px;
  height: 20px;
  flex: none;
}

.cta-small {
  gap: 8px;
  padding: 11px 15px 10px;
  font-size: 15px;
}

.cta-small .glyph {
  width: 17px;
  height: 17px;
}

.quiet-link {
  font: 600 17px/1 var(--display);
  text-decoration: underline;
  text-decoration-color: var(--yellow-deep);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.quiet-link:hover {
  text-decoration-color: var(--ink);
}

/* Navigation and odometer */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--nav-h);
  padding: 0 var(--page-pad);
  transition:
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}

.nav.is-scrolled {
  background: rgb(214 227 230 / 0.82);
  box-shadow: 0 1px 0 rgb(27 25 20 / 0.06);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
}

.nav-sentinel {
  position: absolute;
  top: 12px;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.nav.is-solid,
.nav.is-deep {
  background: rgb(236 226 204 / 0.97);
  box-shadow: 0 1px 0 rgb(27 25 20 / 0.08);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
}

.odo {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.odo-stone {
  position: relative;
  display: block;
  width: 30px;
  height: 42px;
  flex: none;
}

.odo-dome {
  position: absolute;
  top: 0;
  left: 0;
  width: 30px;
  height: 15px;
  border-radius: 15px 15px 0 0;
  background: var(--yellow);
}

.odo-face {
  position: absolute;
  top: 15px;
  left: 0;
  display: grid;
  place-items: center;
  align-content: center;
  width: 30px;
  height: 27px;
  overflow: hidden;
  border: 1px solid var(--stone-edge);
  border-top: 0;
  background: var(--stone);
  line-height: 1;
}

.odo-hi {
  font:
    700 6.5px/1 Mukta,
    sans-serif;
  color: var(--muted);
}

.odo-km {
  font: 800 14px/1 var(--display);
  font-stretch: 85%;
  font-variant-numeric: tabular-nums;
}

.odo-km.tick {
  animation: tick 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}

.odo-text strong {
  display: block;
  font: 750 21px/1 var(--display);
  font-stretch: 90%;
}

.odo-text small {
  display: block;
  margin-top: 3px;
  font: 500 13px/1.1 var(--text);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Hero: a live highway scene that cranes up into the page's road */

.hero {
  --horizon: 0.6;
  --vanish: 0.6;
  --road-near: 0.55;
  position: relative;
  isolation: isolate;
  overflow: clip;
}

.hero-stage {
  position: relative;
  height: max(660px, 100svh);
  overflow: hidden;
  background:
    linear-gradient(var(--sky), var(--sky)) top / 100%
      calc(var(--horizon) * 100%) no-repeat,
    var(--sand);
}

.hero-scene {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.crane .hero {
  height: 200svh;
}

.crane .hero-stage {
  position: sticky;
  top: 0;
  height: 100svh;
}

.crane .hero-copy {
  opacity: calc(1 - var(--crane, 0) * 3.4);
  translate: 0 calc(var(--lift, 0px) * -1);
}

/* The first chapter rides up over the last of the crane shot. Its spine
   stays hidden until the painted road below has landed exactly on it. */
.crane .route {
  margin-top: -40svh;
}

.crane:not(.crane-done) .spine {
  visibility: hidden;
}

.crane-deep .hero-copy {
  visibility: hidden;
}

.crane .hero-stone .stone-hint {
  filter: opacity(max(0, calc(1 - var(--crane, 0) * 6)));
}

.has-scene .hero-stone .plant::after {
  display: none;
}

/* Without the painted scene, a flat road still runs to the horizon. */
html:not(.has-scene) .hero-stage::before {
  content: "";
  position: absolute;
  inset: calc(var(--horizon) * 100%) 0 0;
  background: linear-gradient(#b9b19d, var(--asphalt) 45%);
  clip-path: polygon(
    calc(var(--vanish) * 100% - 1px) 0,
    calc(var(--vanish) * 100% + 1px) 0,
    calc(var(--vanish) * 100% + var(--road-near) * 10%) 100%,
    calc(var(--vanish) * 100% - var(--road-near) * 90%) 100%
  );
}

html:not(.crane) .hero-stage::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  height: 24%;
  background: linear-gradient(rgb(236 226 204 / 0), var(--sand));
  pointer-events: none;
}

html:not(.crane) .spine {
  mask-image: linear-gradient(transparent, #000 220px);
}

.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 780px;
  padding: calc(var(--nav-h) + clamp(28px, 7svh, 88px)) var(--page-pad) 0;
}

.hero h1 {
  margin: 0 0 26px;
  font-size: clamp(50px, min(9.4vw, 16.5svh), 152px);
  font-weight: 780;
  font-stretch: 78%;
  line-height: 0.86;
  letter-spacing: -0.015em;
}

.hero h1 .line {
  display: block;
  white-space: nowrap;
}

.lede {
  max-width: 34ch;
  margin: 0 0 30px;
  font-size: clamp(18px, 1.45vw, 21px);
  line-height: 1.55;
  color: var(--body-ink);
}

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

.for-who {
  margin: 22px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.hero-stone {
  position: absolute;
  right: clamp(24px, 9vw, 168px);
  bottom: calc((1 - var(--horizon)) * 100% - clamp(96px, 17svh, 200px));
  z-index: 2;
  width: clamp(190px, 19.5vw, 310px);
  text-align: center;
}

.plant {
  position: relative;
  isolation: isolate;
}

.plant::after {
  content: "";
  position: absolute;
  right: 4%;
  bottom: -10px;
  left: -26%;
  z-index: -1;
  height: 26px;
  background: radial-gradient(
    closest-side,
    rgb(70 52 18 / 0.24),
    rgb(70 52 18 / 0)
  );
}

.stone-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: grab;
  perspective: 900px;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.stone-button:active {
  cursor: grabbing;
}

.stone-button:focus-visible {
  outline-offset: 12px;
  border-radius: 14px;
}

.spin {
  display: block;
  transition:
    transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.3),
    filter 0.2s ease;
  will-change: transform;
}

.is-pulling .spin,
.is-spinning .spin {
  transition: none;
}

.mark {
  display: block;
  width: 100%;
  height: auto;
}

.mark-hi,
.mark-en {
  font-family: Mukta, sans-serif;
  fill: var(--ink);
}

.mark-hi {
  font-weight: 700;
  font-size: 52px;
}

.mark-en {
  font-weight: 800;
  font-size: 58px;
  letter-spacing: 1.16px;
}

.mark-km {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 78%;
  font-size: 104px;
  fill: var(--ink);
}

.stone-hint {
  min-height: 1.4em;
  margin: 16px 0 0;
  font: 600 14px/1.4 var(--display);
  color: var(--muted);
  text-wrap: balance;
}

.plant:has(.is-ready-to-go, .is-spinning) + .stone-hint {
  color: var(--ink);
}

/* The route: a top-down road that runs the length of the page */

.route {
  position: relative;
  display: grid;
  grid-template-columns:
    [text] minmax(0, 1fr) [road] var(--road) [shoulder] var(--shoulder)
    [demo] minmax(0, 1.12fr);
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

.spine {
  --dash: calc(var(--road) * 0.375);
  --dash-period: calc(var(--road) * 0.9375);
  --block: calc(var(--road) * 0.15625);
  position: relative;
  grid-row: 1 / 6;
  grid-column: road;
  background-color: var(--asphalt);
  background-image:
    linear-gradient(var(--paint), var(--paint)),
    linear-gradient(var(--paint), var(--paint)),
    repeating-linear-gradient(
      to bottom,
      var(--paint) 0 var(--dash),
      transparent 0 var(--dash-period)
    );
  background-position:
    left calc(var(--kerb) + var(--edge-inset) - 1px) top 0,
    right calc(var(--kerb) + var(--edge-inset) - 1px) top 0,
    center top;
  background-size:
    2px 100%,
    2px 100%,
    3px 100%;
  background-repeat: no-repeat;
}

.spine::before,
.spine::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--kerb);
  background: repeating-linear-gradient(
    to bottom,
    var(--yellow) 0 var(--block),
    var(--ink) 0 calc(var(--block) * 2)
  );
}

.spine::before {
  left: 0;
}

.spine::after {
  right: 0;
}

.spine-end {
  position: absolute;
  right: var(--kerb);
  bottom: 0;
  left: var(--kerb);
  height: 12px;
  background: var(--paint);
}

.auto {
  position: sticky;
  top: calc(50svh - 30px);
  z-index: 2;
  width: calc(var(--road) * 0.25);
  margin-left: calc(50% + var(--road) * 0.08);
  padding-top: 28px;
}

.crane .auto {
  margin-top: calc(-50svh - 30px);
  visibility: hidden;
}

.crane-done .auto {
  visibility: visible;
}

.auto-art {
  display: block;
  width: 100%;
  height: auto;
}

.route > article:nth-of-type(1) {
  grid-row: 1;
}

.route > article:nth-of-type(2) {
  grid-row: 2;
}

.route > article:nth-of-type(3) {
  grid-row: 3;
}

.route > article:nth-of-type(4) {
  grid-row: 4;
}

.route > article:nth-of-type(5) {
  grid-row: 5;
}

.chapter {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  align-items: start;
  padding: clamp(110px, 12vw, 176px) 0;
}

.chapter-text {
  position: sticky;
  top: calc(var(--nav-h) + 48px);
  grid-column: text;
  justify-self: end;
  width: 100%;
  max-width: 500px;
  padding-right: clamp(32px, 4vw, 64px);
}

.chapter-km {
  margin: 0;
}

.chapter h2 {
  margin: 0 0 22px;
  font-size: clamp(42px, 5vw, 78px);
  line-height: 0.9;
  letter-spacing: -0.01em;
}

.chapter-text p {
  max-width: 36ch;
  margin: 0;
  font-size: 19px;
  line-height: 1.6;
  color: var(--body-ink);
}

.chapter-stone {
  grid-column: shoulder;
  justify-self: center;
  width: 84px;
  margin-top: 4px;
}

.chapter-demo {
  grid-column: demo;
  min-width: 0;
  padding-left: 8px;
}

.demo {
  margin: 0;
}

.demo figcaption {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

/* Chapter 4: chat */

.chat {
  max-width: 540px;
}

.chat-head,
.chat-log {
  background: var(--stone);
  border: 1px solid var(--stone-edge);
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: #f5f0e4;
}

.chat-avatar {
  width: 26px;
  height: 34px;
  border: 1px solid var(--stone-edge);
  border-radius: 13px 13px 2px 2px;
  background:
    linear-gradient(var(--yellow), var(--yellow)) top / 100% 13px no-repeat,
    var(--stone);
}

.chat-name {
  font: 700 18px/1 var(--display);
}

.chat-name small {
  margin-left: 8px;
  padding: 2px 6px 1px;
  border-radius: 4px;
  background: #e9e2d2;
  font: 500 12px/1 var(--text);
  color: var(--muted);
  vertical-align: 2px;
}

.chat-log {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 20px 16px 22px;
  border-radius: 0 0 18px 18px;
  list-style: none;
  box-shadow: 0 30px 60px -44px rgb(70 52 18 / 0.5);
}

.msg {
  position: relative;
  max-width: 84%;
  padding: 9px 13px 8px;
  border-radius: 16px;
  font-size: 16px;
  line-height: 1.42;
}

.msg.me {
  align-self: flex-end;
  border-bottom-right-radius: 5px;
  background: var(--ink);
  color: var(--stone);
}

.msg.higo {
  align-self: flex-start;
  border-bottom-left-radius: 5px;
  background: #efe8d8;
}

.msg.higo:has(.jobs) {
  max-width: 94%;
}

.jobs {
  display: grid;
  gap: 6px;
  margin: 10px 0 2px;
  padding: 0;
  list-style: none;
}

.job {
  display: grid;
  gap: 3px;
  padding: 10px 12px 9px;
  border-left: 3px solid var(--yellow);
  border-radius: 4px 10px 10px 4px;
  background: var(--stone);
}

.job strong {
  font: 650 16px/1.2 var(--display);
}

.job-company {
  font-size: 14px;
  color: var(--muted);
}

.job-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 3px;
}

.job-tags span {
  padding: 1px 7px 0;
  border-radius: 4px;
  background: #f0eadc;
  font-size: 13px;
}

.job-check {
  margin-top: 2px;
  font: 600 13px/1.3 var(--display);
  color: var(--sign);
}

.job-check::before {
  content: "✓ ";
}

.typing {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  gap: 4px;
  padding: 13px 14px;
  border-radius: 16px 16px 16px 5px;
  background: #efe8d8;
  visibility: visible;
}

.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: dot 1s ease-in-out infinite;
}

.typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing span:nth-child(3) {
  animation-delay: 0.3s;
}

/* Chapter 3: profile */

.profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 216px;
  gap: 18px;
  align-items: start;
  max-width: 660px;
}

.profile-form {
  display: grid;
  gap: 22px;
  padding: 24px 22px;
  border: 1px solid var(--stone-edge);
  border-radius: 16px;
  background: var(--stone);
  box-shadow: 0 30px 60px -44px rgb(70 52 18 / 0.5);
}

.profile-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.profile-form legend,
.field label,
.field output {
  padding: 0;
  font: 650 15px/1.2 var(--display);
}

.profile-form legend {
  margin-bottom: 10px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  position: relative;
  display: block;
}

.chip input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.chip span {
  display: block;
  padding: 9px 14px 8px;
  border: 1px solid #cdc5b4;
  border-radius: 8px;
  background: #fffdf8;
  font: 500 15px/1.2 var(--text);
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    transform 0.12s ease;
}

.chip:hover span {
  border-color: var(--ink);
}

.chip input:checked + span {
  border-color: var(--yellow-deep);
  background: var(--yellow);
  box-shadow: inset 0 -2px 0 var(--yellow-deep);
  font-weight: 600;
}

.chip input:active + span {
  transform: translateY(1px);
}

.chip input:focus-visible + span {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.field {
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 6px;
}

.field output {
  justify-self: end;
  font-variant-numeric: tabular-nums;
}

.odometer-range {
  --fill: 0%;
  grid-column: 1 / -1;
  width: 100%;
  height: 34px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.odometer-range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 4px;
  background:
    linear-gradient(var(--yellow), var(--yellow)) 0 0 / var(--fill) 100%
      no-repeat,
    repeating-linear-gradient(
        90deg,
        rgb(244 241 232 / 0.6) 0 6px,
        transparent 6px 14px
      )
      0 50% / 100% 2px no-repeat,
    var(--asphalt);
}

.odometer-range::-moz-range-track {
  height: 8px;
  border-radius: 4px;
  background:
    linear-gradient(var(--yellow), var(--yellow)) 0 0 / var(--fill) 100%
      no-repeat,
    repeating-linear-gradient(
        90deg,
        rgb(244 241 232 / 0.6) 0 6px,
        transparent 6px 14px
      )
      0 50% / 100% 2px no-repeat,
    var(--asphalt);
}

.odometer-range::-webkit-slider-thumb {
  width: 24px;
  height: 32px;
  margin-top: -14px;
  border: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32'%3E%3Cpath d='M3 12 A9 9 0 0 1 21 12 Z' fill='%23F5B800'/%3E%3Crect x='3' y='12' width='18' height='15' fill='%23FBF9F4' stroke='%23B9AE96'/%3E%3Crect x='1' y='27' width='22' height='4' fill='%23CFC3AA'/%3E%3C/svg%3E")
    center / contain no-repeat;
  appearance: none;
  -webkit-appearance: none;
}

.odometer-range::-moz-range-thumb {
  width: 24px;
  height: 32px;
  border: 0;
  border-radius: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32'%3E%3Cpath d='M3 12 A9 9 0 0 1 21 12 Z' fill='%23F5B800'/%3E%3Crect x='3' y='12' width='18' height='15' fill='%23FBF9F4' stroke='%23B9AE96'/%3E%3Crect x='1' y='27' width='22' height='4' fill='%23CFC3AA'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.odometer-range:focus-visible {
  outline-offset: 4px;
  border-radius: 6px;
}

.range-ends {
  display: flex;
  grid-column: 1 / -1;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--muted);
}

.resume-slot {
  display: flex;
  gap: 12px;
  padding: 14px;
  border: 1.5px dashed #cdc5b4;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.resume-slot strong {
  display: block;
  margin-bottom: 2px;
  font: 650 15px/1.3 var(--display);
  color: var(--ink);
}

.resume-icon {
  position: relative;
  width: 20px;
  height: 26px;
  flex: none;
  margin-top: 2px;
  border: 1.5px solid #8e8573;
  border-radius: 2px 7px 2px 2px;
}

.resume-icon::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 3px;
  width: 11px;
  height: 9px;
  background:
    linear-gradient(#8e8573, #8e8573) 0 0 / 100% 1.5px no-repeat,
    linear-gradient(#8e8573, #8e8573) 0 50% / 100% 1.5px no-repeat,
    linear-gradient(#8e8573, #8e8573) 0 100% / 70% 1.5px no-repeat;
}

.profile figcaption {
  grid-column: 1 / -1;
  margin-top: 0;
}

/* Highway signs: green, white border, mounted on two posts */

.sign {
  position: relative;
  margin: 0 0 30px;
  padding: 18px 18px 16px;
  border-radius: 10px;
  background: var(--sign);
  box-shadow:
    inset 0 0 0 4px var(--sign),
    inset 0 0 0 6px var(--sign-ink);
  color: var(--sign-ink);
}

.sign::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 22%;
  left: 22%;
  height: 30px;
  background: linear-gradient(
    90deg,
    #8b8a83 0 8px,
    transparent 8px calc(100% - 8px),
    #8b8a83 calc(100% - 8px)
  );
}

.profile .sign {
  position: sticky;
  top: calc(var(--nav-h) + 48px);
}

.sign-title {
  margin: 0 0 12px;
  font: 600 14px/1.2 var(--display);
  opacity: 0.85;
}

.sign dl {
  display: grid;
  gap: 11px;
  margin: 0;
}

.sign dt {
  font: 500 12.5px/1.2 var(--text);
  opacity: 0.75;
}

.sign dd {
  margin: 1px 0 0;
  font: 700 20px/1.12 var(--display);
  font-stretch: 88%;
}

.sign dd.flip {
  animation: flip 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

/* Chapter 2: the checkpost */

.checkpost {
  display: grid;
  gap: 18px;
  max-width: 620px;
}

.booth {
  position: relative;
  padding: 62px 0 10px;
  border-radius: 16px;
  background: var(--asphalt);
  color: var(--paint);
  box-shadow: 0 30px 60px -40px rgb(27 25 20 / 0.6);
}

.barrier {
  position: absolute;
  top: 22px;
  right: 22px;
  left: 22px;
  height: 20px;
}

.barrier-post {
  position: absolute;
  top: -6px;
  left: 0;
  width: 16px;
  height: 30px;
  border-radius: 3px;
  background: #e9e4d6;
}

.barrier-arm {
  position: absolute;
  top: 5px;
  left: 8px;
  width: min(62%, 340px);
  height: 10px;
  border-radius: 5px;
  background: repeating-linear-gradient(
    90deg,
    var(--yellow) 0 20px,
    var(--ink) 20px 40px
  );
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.35);
  transform-origin: 0 50%;
  transition: transform 0.45s cubic-bezier(0.3, 1.5, 0.5, 1);
}

.booth.is-open .barrier-arm {
  transform: rotate(-17deg);
}

.leads {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0 10px;
  list-style: none;
}

.lead {
  position: relative;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px 10px;
  overflow: hidden;
  border-radius: 8px;
  font-size: 15px;
  transition: background-color 0.25s ease;
}

.lead-source {
  font: 600 13px/1.2 var(--display);
  color: #b6af9d;
}

.lead-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-verdict {
  padding: 4px 8px 3px;
  border-radius: 5px;
  font: 650 13px/1.1 var(--display);
  white-space: nowrap;
}

.lead.is-passed .lead-verdict {
  background: var(--sign);
  box-shadow: inset 0 0 0 1px rgb(242 245 239 / 0.5);
  color: var(--sign-ink);
}

.lead.is-turned .lead-verdict {
  border: 1px dashed #6f6a5f;
  color: #d7d0bf;
}

.lead.is-turned .lead-title {
  color: #8f897b;
  text-decoration: line-through;
  text-decoration-color: rgb(244 241 232 / 0.35);
}

.lead.is-scanning {
  background: rgb(245 184 0 / 0.13);
}

.lead.is-scanning::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgb(245 184 0 / 0) 0%,
    rgb(245 184 0 / 0.28) 50%,
    rgb(245 184 0 / 0) 100%
  );
  animation: scan 0.52s ease-in-out;
}

.lead.is-checked .lead-verdict {
  animation: stamp 0.32s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.windows {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.windows li {
  padding: 9px 4px 7px;
  border: 1px solid rgb(242 245 239 / 0.3);
  border-radius: 6px;
  font: 700 16px/1.1 var(--display);
  font-stretch: 85%;
  text-align: center;
}

.windows li:first-child {
  border-color: var(--sign-ink);
  background: var(--sign-ink);
  color: var(--sign);
}

.sign-note {
  max-width: 44ch;
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  opacity: 0.92;
}

/* Chapter 1: outreach */

.outreach {
  display: grid;
  gap: 14px;
  max-width: 620px;
}

.research {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px 22px;
  align-items: start;
  padding: 18px 20px;
  border: 1px solid var(--stone-edge);
  border-radius: 14px;
  background: #f4eee0;
}

.research-company strong {
  display: block;
  font: 700 19px/1.2 var(--display);
}

.research-company span {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.people {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.people li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  line-height: 1.3;
  color: var(--muted);
}

.people strong {
  display: block;
  font: 600 15px/1.25 var(--text);
  color: var(--ink);
}

.person-initial {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--stone);
  font: 700 14px/1 var(--display);
}

.person-link {
  border-bottom: 1.5px solid var(--yellow-deep);
  font: 600 13px/1.4 var(--display);
  color: var(--ink);
}

.draft {
  overflow: hidden;
  border: 1px solid #d9d2c2;
  border-radius: 14px;
  background: #fffefa;
  box-shadow: 0 30px 60px -44px rgb(70 52 18 / 0.55);
}

.draft-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
  padding: 0 18px;
  border-bottom: 1px solid #ece6d9;
  transition: background-color 0.15s ease;
}

.draft-row:focus-within {
  background: #fff7de;
}

.draft-row label {
  font-size: 13.5px;
  color: var(--muted);
}

.draft-row input {
  min-width: 0;
  padding: 14px 0 13px;
  border: 0;
  outline: none;
  background: transparent;
  font: 500 15.5px/1.3 var(--text);
  color: var(--ink);
}

.draft textarea {
  display: block;
  width: 100%;
  min-height: 330px;
  padding: 18px;
  border: 0;
  outline: none;
  background: transparent;
  font: 400 16px/1.65 var(--text);
  color: var(--ink);
  resize: vertical;
}

.draft textarea:focus-visible {
  box-shadow: inset 0 0 0 2px var(--yellow);
}

.draft textarea.is-typing {
  color: #2c2922;
}

.draft-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 18px 18px;
  border-top: 1px solid #ece6d9;
}

.draft-copy,
.draft-open {
  padding: 12px 18px 11px;
  border-radius: 6px;
  font: 650 15px/1 var(--display);
  text-decoration: none;
  cursor: pointer;
}

.draft-copy {
  min-width: 124px;
  border: 0;
  background: var(--ink);
  color: var(--stone);
}

.draft-open {
  border: 1px solid #cfc7b6;
  background: #fffdf8;
  color: var(--ink);
}

.draft-open:hover {
  border-color: var(--ink);
}

/* The finish: the road ends at the milestone */

.finale {
  align-items: end;
  padding-bottom: 72px;
}

.finale .chapter-text {
  position: static;
  align-self: center;
}

.finale .hero-actions {
  margin-top: 30px;
}

.finale-stone {
  grid-column: shoulder / -1;
  justify-self: start;
  width: clamp(220px, 23vw, 340px);
  margin-left: clamp(8px, 2vw, 40px);
  text-align: center;
}

/* Questions */

.faq {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 48px;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(88px, 10vw, 150px) var(--page-pad);
}

.faq h2 {
  margin: 0;
  font-size: clamp(42px, 5vw, 78px);
  line-height: 0.9;
}

.faq-list {
  border-top: 1px solid rgb(27 25 20 / 0.16);
}

.faq details {
  border-bottom: 1px solid rgb(27 25 20 / 0.16);
}

.faq summary {
  position: relative;
  padding: 22px 48px 22px 0;
  font: 650 21px/1.3 var(--display);
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 6px;
  width: 20px;
  height: 26px;
  margin-top: -13px;
  border: 1px solid var(--stone-edge);
  border-radius: 10px 10px 2px 2px;
  background:
    linear-gradient(var(--yellow), var(--yellow)) top / 100% 10px no-repeat,
    var(--stone);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}

.faq details[open] summary::after {
  transform: rotate(90deg);
}

.faq details p {
  max-width: 60ch;
  margin: 0 0 26px;
  color: var(--body-ink);
}

/* Footer: the back of a truck */

.footer {
  padding: clamp(72px, 9vw, 120px) var(--page-pad)
    calc(40px + env(safe-area-inset-bottom));
  background: var(--asphalt);
  color: var(--paint);
}

.truck {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0 auto clamp(56px, 7vw, 96px);
  text-align: center;
}

.truck-small {
  font: 700 clamp(16px, 1.8vw, 24px)/1 var(--display);
  font-stretch: 110%;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.truck-small.struck {
  color: #a39d8e;
  text-decoration: line-through;
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 3px;
}

.truck-big {
  font: 800 clamp(64px, 12vw, 184px)/0.88 var(--display);
  font-stretch: 125%;
  color: var(--yellow);
  text-shadow:
    0.04em 0.04em 0 var(--sign),
    0.08em 0.08em 0 #12100c;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  max-width: 1440px;
  margin: 0 auto;
  padding-top: 22px;
  border-top: 1px solid rgb(244 241 232 / 0.16);
  font-size: 15px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 16px/1 var(--display);
}

.footer-mark {
  display: block;
  width: 20px;
}

.footer-row a {
  text-underline-offset: 5px;
}

/* Mobile call-to-action dock */

.dock {
  position: fixed;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 12px;
  z-index: 30;
  transform: translateY(160%);
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.dock .cta {
  justify-content: center;
  width: 100%;
  padding: 17px 22px 15px;
  box-shadow:
    inset 0 -4px 0 var(--yellow-deep),
    0 14px 30px -12px rgb(27 25 20 / 0.5);
}

.dock-on .dock {
  transform: none;
}

/* Motion: one orchestrated arrival, then motion that follows the reader */

.motion .auto-art {
  animation: sway 2.6s ease-in-out infinite;
}

.motion .hero h1 .line,
.motion .lede,
.motion .hero-actions,
.motion .for-who,
.motion .nav,
.motion .hero-stone .stone-hint {
  opacity: 0;
}

.motion .hero-stone .stone-button,
.motion .finale-stone .stone-button {
  transform: translateY(104%);
}

.motion .hero-stone .plant,
.motion .finale-stone .plant {
  clip-path: inset(-100vh -100vw 0 -100vw);
}

.motion.is-ready .hero h1 .line {
  animation: settle 1.3s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.motion.is-ready .hero h1 .line + .line {
  animation-delay: 0.32s;
}

.motion.is-ready .hero-stone .plant,
.motion .finale-stone.is-playing .plant {
  animation: unclip 0.95s linear 0.55s both;
}

.motion.is-ready .hero-stone .stone-button,
.motion .finale-stone.is-playing .stone-button {
  animation: rise 0.95s cubic-bezier(0.2, 0.9, 0.25, 1.12) 0.55s both;
}

.motion .finale-stone.is-playing .plant,
.motion .finale-stone.is-playing .stone-button {
  animation-delay: 0.1s;
}

.motion.is-ready .lede,
.motion.is-ready .hero-actions,
.motion.is-ready .for-who,
.motion.is-ready .nav,
.motion.is-ready .hero-stone .stone-hint {
  animation: appear 0.7s ease 0.95s both;
}

.motion.is-ready .hero-actions {
  animation-delay: 1.05s;
}

.motion.is-ready .for-who,
.motion.is-ready .hero-stone .stone-hint {
  animation-delay: 1.2s;
}

.motion .chat .msg:not(.is-shown) {
  visibility: hidden;
}

.motion .chat.is-played .msg {
  visibility: visible;
}

.motion .chat .msg.is-shown {
  animation: pop 0.38s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.motion .chat .msg.me.is-shown {
  transform-origin: 100% 100%;
}

.motion .chat .msg.higo.is-shown {
  transform-origin: 0 100%;
}

.motion .checkpost:not(.is-played) .lead:not(.is-checked) .lead-verdict {
  opacity: 0;
}

.motion
  .checkpost:not(.is-played)
  .lead.is-turned:not(.is-checked)
  .lead-title {
  color: inherit;
  text-decoration: none;
}

.motion .checkpost:not(.is-played) .windows li:first-child {
  border-color: rgb(242 245 239 / 0.3);
  background: transparent;
  color: inherit;
}

.motion .checkpost .sign-windows.is-lit .windows li:first-child {
  animation: light 0.5s ease both;
}

@keyframes sway {
  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }
  50% {
    transform: translateX(1.5px) rotate(0.8deg);
  }
}

@keyframes settle {
  0% {
    opacity: 0;
    font-stretch: 125%;
    font-weight: 300;
    letter-spacing: 0.04em;
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    font-stretch: 78%;
    font-weight: 780;
    letter-spacing: -0.015em;
  }
}

@keyframes rise {
  from {
    transform: translateY(104%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes unclip {
  0%,
  99% {
    clip-path: inset(-100vh -100vw 0 -100vw);
  }
  100% {
    clip-path: inset(-100vh -100vw -100vh -100vw);
  }
}

@keyframes appear {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes tick {
  from {
    opacity: 0;
    transform: translateY(-70%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes dot {
  0%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@keyframes flip {
  from {
    opacity: 0.2;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes scan {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

@keyframes stamp {
  from {
    opacity: 0;
    transform: scale(1.5) rotate(-6deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes light {
  from {
    border-color: rgb(242 245 239 / 0.3);
    background: transparent;
    color: var(--sign-ink);
  }
  to {
    border-color: var(--sign-ink);
    background: var(--sign-ink);
    color: var(--sign);
  }
}

/* Layouts */

@media (max-width: 1279px) {
  .profile {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile .sign {
    position: relative;
    top: auto;
  }

  .profile .sign dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1099px) {
  :root {
    --road: 44px;
    --kerb: 4px;
    --edge-inset: 5px;
  }

  .route {
    grid-template-columns: [road] var(--road) [content] minmax(0, 1fr);
    column-gap: clamp(16px, 3vw, 32px);
    padding-left: clamp(12px, 3vw, 40px);
  }

  .chapter {
    padding: clamp(72px, 10vw, 120px) 0;
  }

  .chapter-stone,
  .chapter-text,
  .chapter-demo,
  .finale-stone {
    grid-column: content;
  }

  .chapter-stone {
    grid-row: 1;
    justify-self: start;
    width: 64px;
    margin: 0 0 22px;
  }

  .chapter-text {
    position: static;
    grid-row: 2;
    justify-self: start;
    max-width: 600px;
    padding-right: 0;
  }

  .chapter-demo {
    grid-row: 3;
    margin-top: 40px;
    padding-left: 0;
  }

  .finale {
    align-items: start;
  }

  .finale-stone {
    grid-row: 1;
    width: clamp(170px, 34vw, 260px);
    margin: 0 0 36px;
  }

  .finale .chapter-text {
    grid-row: 2;
  }

  .auto {
    width: 16px;
    margin-left: calc(50% + 2px);
  }

  .faq {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
}

@media (max-width: 759px) {
  :root {
    --nav-h: 64px;
  }

  .nav .cta {
    transition:
      opacity 0.3s ease,
      visibility 0.3s ease;
  }

  .dock-on .nav .cta {
    visibility: hidden;
    opacity: 0;
  }

  .hero {
    --horizon: 0.72;
    --vanish: 0.5;
    --road-near: 0.8;
  }

  .hero-stage {
    height: max(680px, 100svh);
  }

  .hero h1 {
    font-size: clamp(46px, 13.6vw, 96px);
  }

  .lede {
    font-size: 17.5px;
  }

  .hero-actions .quiet-link {
    display: none;
  }

  .for-who {
    max-width: 22ch;
  }

  .hero-stone {
    right: 5vw;
    bottom: calc((1 - var(--horizon)) * 100% - clamp(70px, 14svh, 120px));
    width: clamp(118px, 33vw, 200px);
  }

  .stone-hint {
    font-size: 12.5px;
  }

  /* Set by the scene when the stone has to shrink under the button. */
  .hero-stone.is-tight .stone-hint {
    display: none;
  }

  .cta-small span {
    font-size: 14px;
  }

  .chapter h2 {
    font-size: clamp(38px, 11vw, 56px);
  }

  .chapter-text p {
    font-size: 17.5px;
  }

  .msg {
    font-size: 15px;
  }

  .lead {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 10px;
  }

  .lead-source {
    grid-column: 1 / -1;
  }

  .lead-title {
    font-size: 14.5px;
    line-height: 1.3;
    white-space: normal;
  }

  .windows li {
    font-size: 14px;
  }

  .research {
    grid-template-columns: minmax(0, 1fr);
  }

  .faq summary {
    font-size: 19px;
  }
}

@media (min-width: 760px) {
  .dock {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spin,
  .chip span,
  .barrier-arm {
    transition: none;
  }
}

/* Too narrow for the full label: the button reads "Chat with Higo", and
   "on Telegram" stays for screen readers. The closing chapter's text column
   starts right of the road, so its button runs out of room sooner. */
@media (max-width: 359px) {
  .finale .cta-more {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (max-width: 319px) {
  .cta-more {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
