/* The cover and its controls share the coordinate system of the artboard. */
body {
  --canvas-ink: #344458;
  --canvas-blue: #0b99ff;
  --canvas-line: #cfdae6;
  --canvas-surface: #f5f7fa;
  --control-edge: clamp(16px, 1.05vw, 24px);
  --control-height: clamp(40px, 2.6vw, 50px);
  --panel-shadow: 0 1px 8px #24374c23;
  --dot-spacing: clamp(21px, 1.2vw, 30.6px);
  background-color: var(--canvas-surface);
  background-image: radial-gradient(circle, #cfd8e5 1.3px, transparent 1.8px);
  background-size: var(--dot-spacing) var(--dot-spacing);
  background-position: 0 calc(2px - var(--dot-spacing) / 2);
  color: var(--canvas-ink);
}

.mast {
  position: fixed;
  z-index: 12;
  inset: var(--control-edge) var(--control-edge) auto;
  height: var(--control-height);
  background: transparent;
  border: 0;
  pointer-events: none;
}
.mast-inner {
  align-items: flex-start;
  padding: 0;
}
.canvas-menu,
.mast .lang-switch {
  pointer-events: auto;
}
.canvas-menu {
  position: relative;
}
.canvas-menu summary,
.mast .lang-switch,
.dock,
.menu-pop {
  background: #fff;
  border: 1px solid var(--canvas-line);
  border-radius: 8px;
  box-shadow: var(--panel-shadow);
}
.canvas-menu summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: calc(var(--control-height) * 1.97);
  height: var(--control-height);
  padding-inline: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.canvas-menu summary::-webkit-details-marker {
  display: none;
}
.canvas-menu summary .icon {
  width: 22px;
  height: 22px;
}
.canvas-menu summary:focus-visible,
.canvas-tool:focus-visible,
.intro-board:focus-visible,
.mast button:focus-visible {
  outline: 3px solid #0074c2;
  outline-offset: 4px;
}
.menu-pop {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: max-content;
  padding: 5px;
}
.menu-pop a,
.menu-pop button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font-size: 14px;
}
.menu-pop .icon {
  width: 16px;
  height: 16px;
}
.menu-pop a:hover,
.menu-pop button:hover,
.canvas-menu summary:hover {
  background: #eff5fb;
}
.menu-pop [data-dots][aria-pressed="true"] .icon {
  color: #0071bd;
}
.mast .lang-switch {
  display: flex;
  gap: 0;
  padding: 0;
}
.mast .lang-switch button {
  width: calc(var(--control-height) - 1px);
  height: calc(var(--control-height) - 2px);
  padding: 0;
  border-radius: 7px 0 0 7px;
  background: transparent;
  font-weight: 600;
  color: #526578;
}
.mast .lang-switch button + button {
  border-left: 1px solid var(--canvas-line);
  border-radius: 0 7px 7px 0;
}
.mast .lang-switch button[aria-pressed="true"] {
  color: #23354a;
  background: #edf4fa;
}
.mast .lang-switch button:hover {
  background: #e5f2ff;
}

.canvas-home {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 0 25px 4.9svh;
}
.intro-board {
  display: block;
  position: relative;
  container-type: inline-size;
  width: min(100%, clamp(380px, min(26vw, 51svh), 622px));
  aspect-ratio: 622 / 420;
  border: 2px solid var(--canvas-blue);
  background: #fff;
  text-align: center;
}
.artboard-tabs {
  position: absolute;
  left: -1.6%;
  bottom: calc(100% + clamp(10px, 0.65vw, 17px));
  display: inline-flex;
  gap: clamp(5px, 0.34vw, 8px);
  font-size: clamp(10px, 2cqw, 13px);
}
.artboard-tabs > span {
  display: grid;
  place-items: center;
  border: 1px solid #7c96b4;
  border-radius: 4px;
  background: #d2dbe5;
  min-height: clamp(19px, 3.9cqw, 24px);
}
.artboard-tabs > span:first-child {
  aspect-ratio: 1;
}
.artboard-tabs > span:last-child {
  padding-inline: 0.65em;
}
.artboard-tabs .icon {
  width: 1.25em;
  height: 1.25em;
}
.frame-corners {
  position: absolute;
  inset: -2px;
  pointer-events: none;
}
.frame-corners i {
  width: clamp(10px, 2.57cqw, 16px);
  aspect-ratio: 1;
  border: 2px solid var(--canvas-blue);
  background: white;
  border-radius: 4px;
  position: absolute;
}
.frame-corners i:nth-child(1) {
  inset: 0 auto auto 0;
  transform: translate(-50%, -50%);
}
.frame-corners i:nth-child(2) {
  inset: 0 0 auto auto;
  transform: translate(50%, -50%);
}
.frame-corners i:nth-child(3) {
  inset: auto auto 0 0;
  transform: translate(-50%, 50%);
}
.frame-corners i:nth-child(4) {
  inset: auto 0 0 auto;
  transform: translate(50%, 50%);
}
.board-role,
.board-name,
.board-caption {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
}
.board-role {
  top: 19.25%;
  display: grid;
  place-items: center;
  min-width: 13%;
  padding: 0.29em 0.8em;
  background: var(--canvas-ink);
  color: #fff;
  font-size: clamp(12px, 2.7cqw, 17px);
  line-height: 1.28;
}
.board-name {
  width: 65%;
  height: 31%;
  top: 48.7%;
  transform: translate(-50%, -50%);
}
.board-name img {
  display: block;
  height: 100%;
  width: 100%;
  object-fit: contain;
}
.board-caption {
  top: 70.3%;
  color: var(--canvas-ink);
  font-size: clamp(20px, 5.2cqw, 33px);
  line-height: 1.3;
  font-weight: 650;
  letter-spacing: 0.045em;
}
.dock {
  display: flex;
  align-items: center;
  gap: clamp(5px, 0.45vw, 12px);
  padding: 6px;
  bottom: max(var(--control-edge), env(safe-area-inset-bottom));
  box-shadow: 0 1px 9px #24374c29;
}
.canvas-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: clamp(45px, 2.5vw, 52px);
  min-width: clamp(48px, 2.5vw, 52px);
  border-radius: 4px;
  color: var(--canvas-ink);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}
.canvas-tool .icon {
  width: 18px;
  height: 18px;
}
.canvas-tool:first-child .icon {
  fill: currentColor;
}
.canvas-tool:hover {
  background: #edf4fa;
}
.canvas-tool[aria-current="page"] {
  background: var(--canvas-blue);
  color: #fff;
}
.is-home footer {
  position: absolute;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: var(--control-edge);
  margin: 0;
  padding: 3px 6px;
  border: 0;
  border-radius: 3px;
  background: #fff;
  color: var(--canvas-ink);
}
.is-home footer small {
  font-size: 12px;
  line-height: 1.2;
}
.work-page,
.wrap.about {
  padding-top: calc(var(--control-edge) + var(--control-height) + 32px);
}
.work-page .hero h1 {
  font-size: clamp(42px, 6.6vw, 92px);
  letter-spacing: -0.055em;
}
.work-page .hero {
  min-height: min(430px, 50vh);
}
.contact-info a {
  width: fit-content;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.timeline-row {
  background: #f5f7fac9;
}
@media (max-width: 600px) {
  body {
    --control-edge: 14px;
    --control-height: 44px;
    --dot-spacing: 22px;
  }
  .canvas-home {
    padding-inline: 27px;
  }
  .intro-board {
    width: min(100%, 400px);
  }
  .dock {
    bottom: max(13px, env(safe-area-inset-bottom));
  }
  .is-home footer {
    bottom: max(9px, env(safe-area-inset-bottom));
    left: 8px;
  }
  .is-home footer small {
    font-size: 10px;
  }
  .work-page .hero {
    padding-top: 0;
    min-height: 0;
  }
}
@media (max-height: 535px) and (min-width: 570px) {
  .canvas-home {
    min-height: 325px;
    height: 100svh;
    padding-bottom: 4svh;
  }
  .intro-board {
    width: min(52vw, 87svh);
    max-height: calc(100svh - 145px);
  }
}
