:root {
  --ink: #111522;
  --muted: #5f6574;
  --paper: #f7f1e6;
  --paper-2: #efe6d7;
  --accent: #f0a61b;
  --line: rgba(17,21,34,.14);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

body { overflow-x: hidden; }

.topbar {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto 0;
  min-height: 72px;
  padding: 18px clamp(18px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  background: linear-gradient(to bottom, rgba(247,241,230,.97), rgba(247,241,230,.74), transparent);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: .08em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--accent);
}

.brand-text {
  font-size: clamp(1rem, 1.2vw, 1.1rem);
}

.sound-toggle {
  appearance: none;
  border: 2px solid var(--ink);
  background: rgba(247,241,230,.75);
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sound-toggle:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(240,166,27,.16), transparent 30rem),
    linear-gradient(180deg, var(--paper), var(--paper-2));
}

.copy {
  position: relative;
  z-index: 4;
  width: min(680px, calc(100% - 36px));
  padding-top: clamp(110px, 15vh, 170px);
  margin-left: clamp(18px, 7vw, 120px);
}

h1 {
  margin: 0;
  font-size: clamp(4.2rem, 12vw, 10rem);
  line-height: .82;
  letter-spacing: -.08em;
}

.lead {
  max-width: 560px;
  margin: 24px 0 0;
  font-size: clamp(1rem, 1.8vw, 1.4rem);
  line-height: 1.45;
  font-weight: 700;
}

.scene {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(58vh, 590px);
  pointer-events: none;
}

.ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(16px, 3.2vh, 40px);
  height: 3px;
  background: var(--ink);
  opacity: .78;
}

.ground::before {
  content: "";
  position: absolute;
  inset: 7px 0 auto;
  height: 1px;
  background: var(--line);
}

.traveller {
  --facing: 1;
  position: absolute;
  left: 0;
  bottom: clamp(19px, 3.2vh, 43px);
  width: clamp(250px, 26vw, 460px);
  height: clamp(310px, 36vw, 560px);
  transform-origin: center bottom;
  will-change: transform;
}

.sprite {
  position: absolute;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  user-select: none;
}

.lawyer {
  right: 0;
  bottom: 0;
  width: 58%;
  aspect-ratio: 543 / 724;
  filter: drop-shadow(10px 13px 0 rgba(17,21,34,.10));
  background-image: url("/assets/sprites/lawyer-walk-4.png?v=108");
  background-size: 400% 100%;
  background-position: 0% 0%;
}

.bird {
  z-index: -1;
  width: 35%;
  aspect-ratio: 543 / 724;
  right: 60%;
  bottom: 47%;
  filter: drop-shadow(8px 10px 0 rgba(17,21,34,.08));
  background-image: url("/assets/sprites/bird-fly-4.png?v=108");
  background-size: 400% 100%;
  background-position: 0% 0%;
}

@media (max-width: 700px) {
  .copy { padding-top: 100px; }
  .lead { max-width: 90%; }
  .scene { height: 52vh; }
  .traveller {
    width: clamp(210px, 58vw, 330px);
    height: clamp(270px, 76vw, 450px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .traveller {
    left: 50%;
    transform: translateX(-50%) !important;
  }
}
